I want to read a string and parse it in C++ to convert it to doubles from command line and get each number in a vector
'1.1,2.3,3.4,4.6,5.8,6.9,7.8,8.0,9.9,10.11,11.67'
std::string tempInput;
tempInput = argv[1];
vector <double> example;
std::vector< std::string > tokens;
while ( std::cin >> tempInput ) {
example.push_back( <double>( tempInput ) );
}
So what would be the easiest way of doing this/