C++ examples for Data Type:string
Using Brackets to Access Individual Characters in a String
#include <iostream> using namespace std; int main()/*from w w w .ja v a 2s .c o m*/ { string mystring; mystring = "abcdef"; cout << mystring[2] << endl; return 0; }