For example:
char s[]="abcde";
for(int i=0;i<strlen(s);i++)
cout<<s+i<<endl;
Output:
abcde
bcde
cde
de
e
And this doesn't ruin the char array.
What I want to ask for help is, is there another way we can do that with the std::string class?