If I understood the question correctly, then the following suits you. This approach will eliminate every punctuation.
#include <string>
#include <algorithm>
#include <iostream>
int main ()
{
std::string input ;
std::cout << "Please, enter data: ";
std::getline (std::cin,input);
input.erase( remove_if(input.begin(), input.end(), &ispunct), input.end());
std::cout << input << std::endl;
std::cin.get();
return 0;
}
This is the result.
>Please, enter data: There' ?are numerous issues.
There are numerous issues
This approach is exactly what you are looking for by using strtok
#include <stdio.h>
#include <iostream>
int main()
{
char sentence[] = "\"something like this, with spaces, and delimited by this two double quotes\"";
char * word;
std::cout << "Your sentence:\n " << sentence << std::endl;
word = strtok (sentence,"\"");
std::cout << "Result:\n " << word << std::endl;
return 0;
}
The result
Your sentence:
"something like this, with spaces, and delimited by this two double quotes"
Result:
something like this, with spaces, and delimited by this two double quotes