Jump to content
  • Advertisement

Archived

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

QBRADQ

How do I do numeric file output?

This topic is 6248 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

ofstream.write() does not suport numeric output! Good God, what the heck do I have to do to print a dang number to a file!? Edited by - felisandria on September 8, 2001 2:56:35 AM

Share this post


Link to post
Share on other sites
Advertisement
Read my post below When using an ofstream like that, even in binary mode, the numbers are formatted into text. I want just the raw data, two bytes of unsigned int

Anyhoo, typecasting got the job done, and the data file is well intact and usable. I LOVE TYPECAST! Yet it can be VERY bad when abused!

Share this post


Link to post
Share on other sites
Hey, my code will print a number to a file. You should've specified that you wanted raw data

~~~~~~~~~~
Martee

Edited by - Martee on September 7, 2001 12:50:15 AM

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!