You want to write and compile C++ programs on runtime with your Android phone?!
At first I thought that's crazy talk, but with the amount of computing power on phones these days... I just don't know if that's viable on the Android OS. I'd be interested in what you discover about this.