#include #include // cstring using namespace std; // string_at_iteration1.cpp int main() { string str1 ( "Hello World" ), str2 ( "Goodbye world" ); // Element access to the non const strings basic_string ::reference Str1 = str1 [6]; basic_string ::reference Str2 = str1.at ( 6); cout<<"\n str1 [6]; \t"<< Str1 << endl; cout<<"\n str1.at ( 6);\t"<< Str2 << endl; string str ("Hello World"); for (size_t i=0; i < str.length(); i++) { cout <<"\n @ "<< i <<"\t:"<< str.at(i) ; } return 0; }