ok, ive been working on this for about 3 hours. ive stared at the STL references for about an hour. i know the problem is that i need a good algorithm, so looking in the STL references wont help. anyways, heres teh problem.
i have a file that is something like this:
10,5,2,3
now, i want the parts seperated by the commas in seperate variables(int). the limit is 4 variables(must be compatible with any number u to 4). i have written a function written that takes two std::string and a char then takes everything from the beginning to the comma and stores that in the first string. the other part is put into the second string. the comma is deleted.
i think that my way of thinking isnt very good for these kinda problems, so any help, or a finger to the right direction will be appreciated.