using eeprom

Also, what's with x=x+1 etc.? The language is called C++, not C=C+1.

You've been reading too many of PaulS's posts. Does the resulting code run any differently? If not, what does it matter?