how can i use cin.ignore to ignore every character up to and including a specified character – for example a full stop, ’.’ or a comma ',' ??
for example if the person entered Tom Jones.
the program needs to igonre the full stop
please help
#include<iostream>
#include<string>
using namespace std;
int main()
{
string name, surname;
cout <<"what is your name? ";
cin >> name >> surname;
cout << surname << "," << name << endl;
return 0;
}