How is the data organized in your program? Ie, is it in an 2 dimensional array? In that case you should be able to do something like this:
Code:
HANDLE hFile=CreateFile("data.dat",GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
int data[8][8];
//fill array
WriteFile(hFile,(LPVOID)&data,sizeof(data),NULL,NULL);
To read it in again, you pretty much just do the reverse using ReadFile.
Note: I've never actually used these functions, I'm just reading a programming reference. It should work though.
One of the main problems that I have run across is that I don't know how to output a 'return' or newline to the file.
You shouldn't have to do this, unless you want to store different data objects in the one file. If that's the case, a newline or return character is probably not the best separator, because a string may contain that character, therefore disrupting the way the data is read back in.
But if you really want to, then the characters are ASCII codes 13 (CR) and 10 (newline).