cd 拖入文件所在文件夹
//编译
g++ hello.cpp
运行
./a.out
(base) chen@ChendeMacBook-Pro / % cd /Users/chen/Desktop
(base) chen@ChendeMacBook-Pro Desktop % g++ hello.cpp
(base) chen@ChendeMacBook-Pro Desktop % ./a.out
Hello World!
//给可执行文件重命名cnm
(base) chen@ChendeMacBook-Pro Desktop % g++ -o cnm hello.cpp
(base) chen@ChendeMacBook-Pro Desktop % ./cnm
Hello World!