hi guru;
your humble newbie is stuck somewhere with his own codes and he need some help form you.
i have to write a program that take string input and check if is there any ponctuation and remove them.
in the code below i m printing my new string with some space if the user insert any ponctuation without grammatical respect
how can print the whole string without space in between.
There is a method called "Substring removal" in the String class-
1 2 3 4 5
string str = "punct.uation";
// first parameter is the position in the string to erase, second parameter is how many characters you want to erase
str.erase(4,1);
cout<<str<<endl;// will cout "punctuation"