在mac console下 执行c++文件
1
$ g++ -o NewFileName OldFileName.cpp
-o is the letter O not zero
NewFileName will be your executable file
OldFileName.cpp is your c++ file
After you run that command type the following in terminal to run your program:
$ ./NewFileName
2 同1一样效果
$ g++ OldFileName.cpp -o NewFileName
3

浙公网安备 33010602011771号