Can someone tell me something about reading text from a textfile (c-prog)
I'm want to make a program, which can store info. in a file, and this info. will be kept in a file, so when I turn on the program again, so one don't have to write all the info. more times..Is like a database.
fx. it can be as follows:
Name: age Donation
1. Morten Madsen 32 40.000 kr.
2. Grethe Jacobsen 58 420.000 kr
etc.
Then you can call the date, with fx 1. then the name and age and donationsdate will be located into a struct, so I can use it on the screen
ex.
struct data
{
char name[30];
int alder;
float donation;
}record;
But how do i read the formatted text from the file, så I can split the textstringup into 3, so the can go into the struct on the right places.
Does anybody know anything about this, i'm having trouble finding manuals about this.
Regards
!G!