c++ question
Steve
smorrey at gmail.com
Fri Sep 22 18:03:28 MDT 2006
In that case &foo would be &foo[0] it's implied
On 9/22/06, Russel Caldwell <caldr704 at gmail.com> wrote:
> Here's what's confusing me. If I create a integer array I will get the
> following:
> int foo[10] = {1, 2, 3};
>
> cout << &foo; //gives me the address foo
> cout << foo; //gives me the address of of foo[0]
>
> If I create a character array:
> char foo[] = "Hello";
>
> cout << &foo; //gives me the address of foo
> cout << foo; //gives me the string stored in foo
> What will give me the address of foo[0]?
>
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
>
More information about the PLUG
mailing list