Hi, I have a text file that looks like this:
<file>
POV Scene Description File
Starting value of t:
0
Ending value of t:
6.28
Number of balls:
200
</file>
Anyways, I have to read in certain parts of the file. Specifically, 0, 6.28, 200. The rest is stuff I don't need but it's required that I read in only those values. All of my program is ready to go and to test, I've simply had it set up like this "0 6.28 200" but I have to change it so it looks like the example above and I have no idea. Heh, I tried this
Code:
input >> variable >> variable >> variable;
for example, with input being my fstream variable but that of course did not work, I really have no idea what to do as getline is for strings so I'm stumped. Anyhelp will be appreciated. Also for your information, I am using fstream. Thanks