Hello guys,
I really need your help in here. Please do your best.
I have the following:
---------------------------------------
---------------------------------Code:Typedef struct textbook { char title[70]; char author[60]; int year; float *price; } TEXTBOOK;
and I have the following in my (textbook.txt) file:
---------------------------------
2
The Big help
John Green
1988
20.78
Yellow Stone
Jack Ford
1912
19.7
----------------------------------
What I'm trying to do is to create a TEXTBOOK variable and read the data in for each field in that structure. And pass this variable into another function that prints each book with its details in one line. Also, if the first line in the text represent how many are there, so if we have more than 2 the code should get it right.
Please guys, I'm really stuck in here.