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.
All 7 Replies
I_m_rude commented: WaltP is WaltP! He can never change! :-D hahahaha... awesome :-D yes sir, ! you win +0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.