According to the text at http://www.cplusplus.com/reference/string/string/, string library in C++ is a class, not just a " mere sequences of characters in a memory array". I wrote this code to find out more:
string s = "abcd";
cout << &s << endl; // This gives an address
cout << s[0] << endl; // This gives 'a'
cout << &s[0] << endl; // This gives "abcd"
I have some questions:
1. Is string library in C++ still an array of sequence characters?
2. How can I get the address of each character in string? (As in the code, I can retrieve each character, but cannot get its address using & operator
)