I am having problems splitting 1 string into sub strings.
the section of code is as follows
getline ( file_1, line );
index = line.find(",",1);
time = line.substr(0,index);
prob = line.substr(index,4); //works when rem'd
line, time and prob are strings
index is size_t
The file i am ready has the data in the following format
When the program runs I get a abnormal program termination. with the prob line removed the prog runs fine with no errors.
I have tried casting index to int before the prob line and changed the substr format to line.substr(index); but nothing works
Can anyone point out where I am going wrong