Russel Caldwell wrote:
When I do cout << &foo[0], I get "Hello". Why is that?
Because cout always interprets a char * as a directive to print the NULL terminated string that the argument points to.
If you want to see the address of foo (which is also the address of the first element of foo) you'll want to use printf("%p", foo).
/* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
