Skip to main content
gamedev.net
🔒 Locked

Simple problem.. loading binary text files..

Started by Cobra Jan 21, 2001 at 12:56 PM 1 replies 400+ views
Original Post
Cobra
Cobra
Okay, this will be a very simple problem for anyone who has done it before. I will use nehe''s tutorial 23 just as an example. Is there any way that I could open the world.txt file and save it in binary format, then when I run the program, it reads it from the binary format and loads the level? I used to know how to do this, and it was fairly simple. Can someone please remind me! hehehe Thanx in advance. ~Cobra~
"Build a man a fire, and he will be warm for a day. Set a man on fire, and he will have warmth for the rest of his life"
zedzeek
zedzeek
use "wb" instead of "wt" in fopen, b is binary t is text, w = write, r = read,
all other methods of file minipalation are pretty similar

http://members.xoom.com/myBollux
Cobra
Cobra
Oh yeah! lol... I knew it was something simple.

Thanx loads.

~Cobra~
"Build a man a fire, and he will be warm for a day. Set a man on fire, and he will have warmth for the rest of his life"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.