How do you write a array to a file?
Hey,
Well I can''t figure out how to use ReadFile and WriteFile to write and read a map array like this "map[42][42]" from a file, how would I go about reading and writing that to a file, thanks.
James.
well the way i do it, using the old C libraries (which works just fine is)
simple!
int map[42][42];// to read from fileFILE *ff = fopen ("filename.file", "r");fread (map, 42*42, sizeof(int), f);fclose(f);// to write to filef = fopen ("filename.file", "w");fwrite (map, 42*42, sizeof(int), f);fclose(f);
simple!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement