This script helps to run C/C++ files on termux
First, we need access to the internal storage
-
termux-setup-storage
-
cd storage/downloads
After that we prescribe everything else in order
-
git clone https://github.com/RuslanFF/C-CPP-file-compiler-on-termux.git
-
cd C-CPP-file-compiler-on-termux
-
pip install -r requirements.txt
-
pkg install clang
After that you should put the script main.py in the folder where your C/C++ files are, go to that folder and run the script by typing
- python main.py
You can also use this way to compile your code.
- python main.py [filename.cpp] [namefile]
Enter without square brackets
I suggest using two sessions for convenience. The first session for compilations the second session to run, it will be faster and more convenient