Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How do I Expand Record?

How do I Expand Record?

How do I Expand Record?

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!

RE: How do I Expand Record?

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close