Final project proposal 

(feedback from Professor Scott)

I'm not sure if the SDL will let you type in code, but a compromise/start could be to provide the user with options that are better structured... sort of like a chose your own adventure game but with code fragments.  You could even add in ones that are not correct and something not good happens.

The game reminds me of Logo that is used exactly as you intend - to teach middle school kids programming.  There is a new version called NetLogo you can play around with on the web and making your own Logo would be fine.

Note, though, at some point you'll have to make an interpreter/compiler and although we are starting to offer compilers it is non-trivial to compile code.  If you don't want to provide options in the game take a look at Logo (maybe there are C++ APIs?) and let me know what you think.

- PS