Quote Originally Posted by Eman
oh no..foo and foo.data[0] is not the same thing..
hold on what're you saying (baffled), that the characters are like member variables of the string object?
With the implementation that I have in mind, the characters belong to a dynamically allocated array. There is a pointer member in the String object that points to the first character of this dynamically allocated array.

When you access s[0], it accesses s.data[0], returning it by reference. Therefore, the address of s[0] is the address of s.data[0]. Hence, if &s is equal to &s[0], then &s is equal to &s.data[0].