Dude have you even tried my code? "hello," is gone and friend remains. Now, all i want is ",friend" gone and hello to remain.
Anyone else?
Actually nothing is gone. All you did was take a section of the string and create another string from it....dude.
#include <iostream>
#include <string>
using namespace std;
int main()
{
char comma = ',';
string str1 = "hello,friend";
string str2 = str1.substr(str1.find(comma)+1, str1.length()); //i guess this line...
cout << str2 << endl;
cout << "original string->" << str1 << std::endl;
//system("pause");
return 0;
}