I have the following data in a c++ string
John Doe 01.01.1970
I need to extract the date and time from it into int variables. I tried it li
You need to use
std::stringstream ss; ss << stringVar; ss >> intVar;
or
intVar = boost::lexical_cast(stringVar);.
intVar = boost::lexical_cast(stringVar);
The later is a convenience wrapper from the boost library.