[問題] 有無支援C++11的IDE?
我目前去下載TDM gcc 4.6
下載完後code::blocks -> Settings ->Compiler and debugger
->Toolchain executables
->更換到我所安裝的TDM gcc目錄下
->再到compiler settings下勾選Have G++ follow the
coming C++0x ISO c++ language sttandard
照上面的操作後
還是無法編譯過..
我的code:
#include <iostream>
#include <utility>
#incldue <tuple> //c++11
using namespace std;
int main()
{
pair<int,char> a;
tuple<int,char,double> b;
a=make_pair(2,'a');
b=make_tuple(3,'b',4.5);
cout << a.first << a.second;
cout << get<0>(a) << get<1>(a);
cout << get<0>(b) << get<1>(b) << get<2>(b);
get<1>(b)='c';
cout << get<0>(b) << get<1>(b) << get<2>(b);
return 0;
}
還是我方法不對?
>"<
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.37.131.107
→
03/25 17:56, , 1F
03/25 17:56, 1F
→
03/25 19:02, , 2F
03/25 19:02, 2F
→
03/25 19:23, , 3F
03/25 19:23, 3F
→
03/25 20:55, , 4F
03/25 20:55, 4F
推
03/26 06:08, , 5F
03/26 06:08, 5F
→
03/26 10:57, , 6F
03/26 10:57, 6F