So I guess my question is:
Can I grab an entire line using cin.getline(), and grab an entire line and ignore the whitespaces?
What I'm trying to do is grab the following line:
and I want to know how many numbers are in it?
OR maybe a better question would be how would I grab the 2 3 individually?
What I'm trying to do is grab 2 and 3 but if i use myfile >> number it grabs them one at a time, but I can't guarantee that the line will only contain 2 numbers (could be any number), and I want to use each line as inputs to a function....does that make sense?
(I'm attempting to solve the google codejam round 1 problem, where you basically take the numbers on the line square them and add them together, if the result is 1 then you're done, if the result is greater then 1 you split the two numbers again and do it all over again).
I just can't seem to figure out how to grab the two (or x) numbers so I can work with the data.....Once i have the data I think I can solve the problem fairly easy...LOL
Thank you for any help