首页 > 编程语言 > 详细

g++ c++11 c++0x

时间:2020-05-16 13:14:28      阅读:34      评论:0      收藏:0      [点我收藏+]

g++要想支持c11的话,编译时

g++ -o t test.cpp -std=c++0x

g++ -o t test.cpp -std=c++11

 

#include <iostream>
#include <array>

using namespace std;

int main() {
    array<int, 10> a = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    a[0] = 22;
    cout<<a.at(0)<<endl;
    cout<<a.back()<<endl;
    return 0;
}

 

g++ c++11 c++0x

原文:https://www.cnblogs.com/longchang/p/12899431.html

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