Hello everyone I'm having a bit of trouble with C. Its been awhile and I was wondering if I'm on the right track I'm trying to read from a file and manipulate the data with a structure I created. The problem is the first two values in the text document will be used for the loop count and the next will be used to subtract from other values in the document. For instance the first value is 10 so go through 10 lines of the document and the next line is the date 20120803. I want to read these two and then for the remainder of the data (student ID, course number, submission date) I want to store those in different variables. I was thinking I would either read the document with fgets and then store the values using sscanf or just store and read through the document using fscanf.
Prisms 0 Light Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
I_m_rude commented: WaltP is WaltP! He can never change! :-D hahahaha... awesome :-D yes sir, ! you win +0
Perry31 -6 Light Poster
Prisms 0 Light Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
I_m_rude
Prisms 0 Light Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.