我想在Termux(c++)中执行一个简单的代码,但是每次我得到一个错误:
bash: ./test.cpp: Permission denied
Storage permission is on and gcc is installed. 我需要根还是其他东西?
发布于 2018-10-30 12:35:45
正如molbdnilo所说,您应该首先编译您的源文件:
g++ test.cpp然后执行生成的二进制文件(默认名称为a.out)
./a.out发布于 2019-10-01 17:51:46
编译并在termux自己的目录中运行它。刚开始的时候:
cd storage/
nano test.cpp
g++ test.cpp "./a.out" 你可以跑了!
发布于 2020-08-28 07:02:20
C++做不到,你必须先编译。如果是Python,您可以将#!/usr/bin/env python添加到第一行,然后在shell中运行chmod 744 xxx.py,然后运行./xxx.py.xxx.py。
https://stackoverflow.com/questions/53064120
复制相似问题