I'm trying to save an int to a file so that it can be read in notepad. Currently it is going to save the score to the file, and I'm probably going to have it so it saves a high score list or something later.
The problem is that I think it is saving in binary, because when I open it in notepad all I get is the "unsupported character symbol" (looks like a rectangle). Here's what I've got:
Thanks!Code:int score=0;//this is added up through the game DWORD dw=0; HANDLE hFile=0; hFile=CreateFile("score.txt" ,GENERIC_WRITE,0,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,0); WriteFile(hFile,(void *)&score,sizeof(int),&dw,0); CloseHandle(hFile);