Hi,
I've found quite a number of posts on this topic but all of those were how to read only streams from a data file. I know fgets() can do the job but what if I have BOTH streams and floats/integers in my data file? I used structure to create the records and I am trying to load the whole file into the memory.
After saving to the data file it looks like this :
Name = aaa
Address = bbb
Total Hours Worked = 45
Pay Rate = 12
Wages = 540
Name = ccc
Address = ddd
Total Hours Worked = 20
Pay Rate = 12
Wages = 240
...
...
Note: Pay Rate & Wages are not saved as strings but as floats/integers.
1. How can I load these records into memory?
2. Will it help me if I save the records in my datafile like these :
aaa
bbb
45
12
540
ccc
ddd
20
12
240
Any help from anyone...PLEASE...