It is c++ code and I know my code and java was not built for android. What libraries do I use from the sdk and ndk? What is the equivalant of getline, cin, if, and cout? I use iostream.
Since Android is based on Linux you can theoretically run a program that's written for linux. All you have to do is compile it for that target processor (usually ARM) and maybe install some missing libraries. [Rewriting is probably easier.]