I use the following compilation command to compile the program:
g++ tank.cpp -std=c++11 -I/opt/homebrew/Cellar/sfml/2.6.1/include/ -o tank -L/opt/homebrew/Cellar/sfml/2.6.1/lib/ -lsfml-graphics -lsfml-window -lsfml-system
得到文稿格式的文件,使用如下命令给文件可执行权限
chmod +x tank