Skip to main content
GameDev.net gamedev.net
🔒 Locked

File I/O

Started by shalrath Jan 8, 2004 at 9:00 PM 0 replies 250+ views
Original Post
shalrath
shalrath
I've got a 2 dimentional array, defined as such: float **a; and allocated at run time. I'm just wondering the best way to write this to a file (using C++ I/O) and read it back in. Just to save reading raw data and putting it back into the array every time I start the program. [edited by - ShalRath on January 8, 2004 10:02:26 PM]
Chris Hare
Chris Hare
I''d say...

In binary, have two unsigned ints for the array dimensions, then the array row by row.

I don''t know what it would be for, but the less file usage the better, so maybe a read at the start, a write at the end, and nothing else in between.


blah blah blah.

Topic Locked

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

Sign in to reply to this topic.