c++ - error: 'unordered_set' is not a member of 'std' -


in c++, trying declare unordered_set this:

std::unordered_set<int> k; 

but showing error:

error: 'unordered_set' not member of 'std'

i using g++ (gcc) 5.3.0 on windows using mingw. here things have considered:

  1. adding header file #include <unordered_set>
  2. upgrading mingw
  3. using flag -std=gnu++11. (this not generating executable or error, not sure if doing or not)

how fix , compile code successfully?

use -std=c++11 switch , specify output file.

g++ -std=c++11 your_file.cpp -o your_program 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -