Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I Expand Record?

Status
Not open for further replies.

worthless

Technical User
Dec 7, 2004
1
US
I am reading a record using the fgets function. The record from the old file terminates at position 733. I need to insert data at positions 3025 and 3040 and then write the modified record to the new file. Since the record ends at position 733 I cannot insert data in the positions 3025 and 3040. I need to know how to get rid of the character that is terminating the record so I can expand the record so that it ends at 3067 thus being able to insert data in these latter positions. Could someone please tell me how? Please, I have a deadline of December 15th!
 
try using fread, if this is 1 record read all 3067 chars otherwise use fseek to goto the file position you want and start reading from there.

Hope this help
TM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top