首页 > 编程语言 > 详细

在mac console下 执行c++文件

时间:2016-03-21 12:11:56      阅读:181      评论:0      收藏:0      [点我收藏+]

$ 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

在mac console下 执行c++文件

原文:http://www.cnblogs.com/pengyingh/p/5301246.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!