Last updated on May 5th, 2020 at 05:40 pm
I would like to use #include <unordered_set>
in my cpp coding, but it show error when I compile.
error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
Solution
Before you compile, or run do this first.
cmake CMakeLists.txt
Then add this in your CMakeList.txt file
SET(CMAKE_CXX_FLAGS "-std=c++11 -O3")
Then try to compile again. Good Luck.