Toggle navigation
首页
博客
下载
AI
科技
互联网
会员
中心
会员中心
发布资讯
发布博文
发布资源
首页
文章中心
C++
g++编译支持c++11的方法
166 阅读
0 评论
110 点赞
我是
靠谱客
的博主
温婉萝莉
,这篇文章主要介绍
g++编译支持c++11的方法
,现在分享给大家,希望可以做个参考。
[cpp]
view plain copy
//第一种,直接包含在源程序文件中,如第一行代码所示
#pragma GCC diagnostic error "-std=c++11"
#include <iostream>
using
namespace
std;
int
main(
int
argc,
char
**argv)
{
cout<<
"hello world!"
<<endl;
auto i=10;
cout<<i<<endl;
return
0;
}
//第二种方法,可以直接取别名方法 如下所示:
alias g++=
'g++ -std=c++11'
g++ hw.cpp -o hw
最后
以上就是
温婉萝莉
最近收集整理的关于
g++编译支持c++11的方法
的全部内容,更多相关
g++编译支持c++11
内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(
110
)
本文分类:
C++
浏览次数:
166
次浏览
发布日期:2023-07-27 00:15:03
本文链接:
https://www.kaopuke.com/article/k-p-k_14_uzo_22_f1_13__7__26_y.html
相关文章
【转】gcc编译错误表
terminate called after throwing an instance of 'std::system_error' What(): Resource temporarily...terminate called after throwing an instance of ‘std::system_error’ What(): Resource temporarily unavaible
报错:unrecognized command line option ‘-std=c++11’
解决使用g++编译C++代码报错的情况解决使用g++编译C++代码报错的情况
g++编译支持c++11的方法
Linux gcc编译之-std选项
Ubuntu 14 g++ 使用c++11特性报错
C++ 单例模式 call_once : terminate called after throwing an instance of ‘std::system_error‘
评论列表
共有
0
条评论
发表评论
取消回复
登录
注册新账号
立即
投稿
返回
顶部
发表评论 取消回复