Mac OSX 10.7.4, Xcode 4.4.1, no <array> header file?

I am writing a program that will use an array container of the C ++ standard library to store some objects. However, whenever I try to include the following line of code in my program:

#include <array>

At compile time, I get the following error:

75-143-76-177:soft jeffersonhudson$ g++ mms.cpp -o mms
mms.cpp:5:17: error: array: No such file or directory 
75-143-76-177:soft jeffersonhudson$ 

By commenting on #include, I can just compile. Have I missed something simple? I installed "Command Line Tools" in Xcode, am I still missing something?

EDIT:

I found the location of the array on my computer

/usr/clang-ide/lib/c++/v1

knowing what should i do?

+5
source share
2 answers

<array> ++ 11, -std=c++11, , -stdlib=libc++ . g++, Xcode, , ++ 11. clang?

clang++ -std=c++11 -stdlib=libc++ mms.cpp -o mms
+4

, LLVM lib++, GCC libstd++.

std::array , :

#include <tr1/array>

lib++ ++ 11, , KennyTM (+1).

+5

All Articles