|
Well heres my idea and how I've implemented it now:
I first read the highscores file (using fread()), then decrypt it (using a custom algorithm). Then the checksum is calculated (without the last 4 bytes of the file to not include the checksum itself in the checksum) and then the checksum calculated is verified with the one specified in the file.
Then I use sscanf() to put the data into my data structures with each score and each person's name.
About your C++ way, I'd like to have a small code example of a class explaining your explanation (get it?).
I'm really interested in learning more to do this in a more structured way than I'm doing now.
You see, I was programming in assembly before and jumped onto C and C++ about a year ago, but even in C and C++ I'm sometimes coding like it's assembly, thinking too much low-level.
|