Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
You can also think about strtol as a way to parse known good input.
L7Sqr
Practically a Master Poster
657 posts since Feb 2011
Reputation Points: 201
Solved Threads: 124
Also, i need a function that can remove parts of a string.
That's what the substr() function does.
string n1 = "243+79";
string first = n1.substr(0,3);
string second = n1.substr(4,2);
In other words string.substr(starting_index, number_of_characters);
Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403