A89: About saving integers in C.


[Prev][Next][Index][Thread]

A89: About saving integers in C.




For saving a high score in C, how would you work that?

So far I have...

	if (Score > HighScore) {
		ClearPlanes();
		Print(20,20,"YOU ACHIEVED BEST SCORE!",A_REPLACE);
		HighScore = Score;
		sprintf (TextBuffer, "%d", HighScore);
		Print(50, 27, TextBuffer, A_REPLACE);		
		ngetchx();	
	}

Now it will replace the value of high score, but it won't write it to
memory,
because next time I run the program, it says BEST SCORE: 0.

Please help.

Thanks,
S. Thompson