2017-05-29 25 views
0

我想定義以下別名爲命名空間圖書館前the official reference在cppreference.com上,但到目前爲止我無法使它工作。我錯過了什麼?不合格的ID「使用」

+2

然後,與C + + 11啓用?你使用什麼編譯器?它是什麼版本?你設置了哪些標誌或選項? –

+0

我正在使用Eclipse Neon。這是編譯命令運行: g ++「-IC:\ Program Files(x86)\ CFITSIO \\ include」「-IC:\ Users \ Enzo \ workspace \ Boost \ include」-O0 -g3 -Wall -c -fmessage -length = 0 -o main.o「.. \ main.cpp」 – GoGoLander

+0

然後C++ 11未啓用。您需要將'-std = C++ 11'選項添加到build命令。我不知道Eclipse是如何完成的。 –

回答

0

Some programmer dude明白了:C++ 11沒有設置。 要設置正確的方言,請轉到:Project-> Properties-> C/C++ Build-> Settings-> Tool Settings-> GCC C++ Compiler-> Dialect-> Language Standard-> ISO C++ 11