line contains what it should, 10,0.00,0,0,,,,
hmm... this seems to work for me, so I cannot really duplicate your problem:
Code:
#include <string>
#include <iostream>
int main()
{
std::string line("10,0.00,0,0,,,,");
std::string::size_type index = line.find(",",1);
std::string time = line.substr(0,index);
std::string prob = line.substr(index,4);
std::cout << time << "\n" << prob << "\n";
}
Of course, you have a slight off by one mistake in that prob should be line.substr(index + 1, 4), but I certainly do not get an "abnormal program termination".