#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
string s="ab@c";
//reverse and begin() end()
reverse(s.begin(),s.end());
cout<<s<<endl;
//
cout<<s.length()<<endl;
cout<<s.empty()<<endl;
//s.swap(b) swap content with string b
cout<<(int)s.find('@')<<endl;
cout<<(int)s.find('9')<<endl;
//substr
cout<<s.substr(1,2)<<endl;
cout<<s.substr(0)<<endl;
//erase(delete nth element)
cout<<s.erase(s.begin()+n);
return 0;
}

Hubert's Coding Notes
Useful notes for CS people