#include <iostream>
usingnamespace std;
int main()
{
constchar* bird = "Seagul";
string name = "adam";
cout << name[1] << endl; // prints d
cout << bird << endl; // prints Seagul
cout << name << endl; // prints adam
cout << bird[3] << endl; // prints g
cout << &bird[3] << endl; // prints gul
}
And don't forget that the operators are also overloaded for std::string as well as all the standard numeric types. You can also overload these operators for your own types as well.