I have a string, taken via a substring. I need to convert it into an integer. The string is of class string. I.e.:
I know that temp is a number...because the file I'm inputting from has the following line (I checked the value of line, it's correctly inputted):Code:
// line inputs from a file...
int index= line.find(' ',0);
string temp= line.subt(0, index);
1 -1 -1 1.
How can I convert it?