我的代码块不支持元组。我现在能做什么?

时间:2018-11-10 15:42:40

标签: c++

#include<iostream>
#include<tuple>

using namespace std;



int main()
{

    tuple< int ,char,float>temp;

    temp = make_tuple( 10, 'a',  5.5);

    cout<<"the initial values of tuples are:";
    cout<<get<0>(temp) << " " <<get<1>(temp)<,endl;
}
#error This file requires compiler and library support for the \
     

当我编译我的代码时,它显示了这一点。

1 个答案:

答案 0 :(得分:0)

这是激活c ++ 11的方法:

How can I add C++11 support to Code::Blocks compiler?

您的代码中有错误,因为您使用了<,,它应该是<<,否则在VS上对我来说效果很好