reading data contents from files in c++
Hello there. Well im stuck with a problem of how to extract data from a given data file. i have to read line by line. for example:
this line contains numbers(int):
2 3 4 5 6
i have to read each of these and assign each to a variable that i"ll be able to calculate the sum.
another line:conataining floating pt numbers. same thing to do here.
and lastly of how to concatenate some characters to form a string, the characters will be read from the data file.
Any suggestion plz... :)