Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

PSO_boy

move to certain point in file and replace line?

This topic is 5882 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have been trying to figure out all month how th do this, i want to move in an INI file and change a line from example; "user=12345" to maybe "user=32552". Thanks. BTW. (C++ code.) NULL [edited by - PSO_boy on August 17, 2002 4:52:40 AM]

Share this post


Link to post
Share on other sites
Advertisement
1) read the file in
2) parse file with e g scanf()
3) make the adjustments
4) dump the file

I''d say messing around with selective changes is far greater a hassle than taking on the entire INI file at a time, especially considering you have such a beautiful file layout (easy to scan). Another way would be counting bytes and such - you could write your own class for it or something, but I''ve heard of INI management utilities/libs out there so you might want to have a look in that as well.

Hope this helps,
Crispy

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!