dario dario - 11 months ago 48
C++ Question

'array' is not a member of 'std'

I've been looking for a resolution of this error for a while without success. There are a few answer to this topic and they did not help me at all.
I am compiling on Linux Mint using codeblocks 12.11 a simple C++ program and I encountered

error: 'array' is not a member of 'std'

Some other answers suggested to check the Compiler Setting in: Settings -> Compiler -> Compiler settings -> Compiler Flags, and I thought the case: Have g++ follow the C++11 ISO C++ language standard [-std=c++11]. I still have the same error. Anybody can help?

Answer Source

You just need to include header <array>

#include <array>

If the compiler does not support std::array then in this case it will issue an error that this header is not found.