I have an idea, not entirely sure if it will work and I have to go, I can make a class for this when I come home and test the idea further.
Setup for the struct (psuedo-code)
struct CheatCode
int progress (init as 0)
std::string code; (all lower OR uppercase)
function-pointer callback (see
http://www.newty.de/fpt/index.html for function pointers)
put these in an array or a list.
Psuedo code for a possible function used by your keyboard callback function when a key is pressed, assuming you have one.
<convert to lower/upper case (the same as code)>
<iterate through cheat codes>
....<is it the the current->progress-th character>
..........<yes: increment current->progress by 1>
..........<no: set current->progress to 0>
....<is the current->progress on code->code.length)>
..........<yes: run callback function>