c++ question

Russel Caldwell caldr704 at gmail.com
Fri Sep 22 18:00:31 MDT 2006


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]?



More information about the PLUG mailing list