I\'m trying to figure out how could I parse this string using \"sstream
\" and C++
The format of it is: \"string,int,int\".
I need to be able to ass
It isn't fancy but you can use std::getline to split the string:
std::string example("127.0.0.1,12,324");
std::string temp;
std::vector tokens;
std::istringstream buffer(example);
while (std::getline(buffer, temp, ','))
{
tokens.push_back(temp);
}
Then you can extract the necessary information from each of the separated strings.