It really depends on what you want to do.
If you just want to see the output of some C ++ code, you can use some online compilers like Codepad or Ideone . Ideone also has an API, and there is an iPhone application called CodeToGo that uses it to enable code to run in the application - you can try to search or create something similar for Android.
Another possibility, although probably more difficult, is to install a fully functional Linux distribution on your phone, for example Debian (which has everything you need to install the compiler) - there is a guide on how to do it here , and you can search more in google.
source share