Originally Posted by
TheCPUWizard
You are missing some VERY VERY basic C++ knowledge. You are not nearly to the point of writing this type of application if you do not understand casting and const-correctness.
Simply put:
If you tell the compiler that you are not allowed to modify something, then attempt to say that you can, the compiler stops you.
So, DONT try to lie to the compiler, DONT try to outsmart the compiler.
DO, get a good C++ text book, and start at page #1, reading every word, and typing in EVERY line of code, and stepping through EVERY line of code with your debugger.
When you finish the book in a few weeks (assuming several hours per day dedicated to the task), you can look at this project, and immediately see the problem.