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
You could do something like this as well I believe (Totally off the top of my head so apologies if i made some mistakes in there) ...
stringstream myStringStream( "127.0.0.1,12,324" );
int ipa, ipb, ipc, ipd;
char ch;
int aNumber;
int bNumber;
myStringStream >> ipa >> ch >> ipb >> ch >> ipc >> ch >> ipd >> ch >> aNumber >> ch >> bNumber;
stringstream someStringStream;
someStringStream << ipa << "." << ipb << "." << ipc << "." << ipd;
string someString( someStringStream.str() );