|
[ul][li]1Install Termux from Playstore! (Termux is Linux Terminal Emulator with many utilities!)[br][/li][/ul][ul][li]2Open it, update & upgrade the packages using - apt-get update && apt-get upgrade[br][/li][/ul][ul][li]3Now install Clang (C/C++ compiler) using this command - apt-get install -y clang[br][/li][/ul][ul][li]4Create a .cpp file using[br] this command - touch [filename].cpp[br][/li][/ul][ul][li]5Now edit this file, I mean add the codings, using nano - apt-get install -y nano and after the edit the file using - nano [filename].cpp[br][/li][/ul][ul][li]6After saving this, compile this source code using - clang [filename].cpp[br][/li][/ul][ul][li]7And the output file will be saved as a.out which you have to execute using - ./a.out.[br][/li][/ul][a href="https://www.quora.com/How-can-I-run-a-C++-program-on-an-Android-phone/answer/Anahul-Kumar"]nswered Apr 17[/a][br][br]
[br][br][br] |
|