I want to use ordered_set in C++, for that I copied the header files from here.
The header files are –
include <ext/pb_ds/assoc_container.hpp>
include <ext/pb_ds/tree_policy.hpp>
Now when I compile the code, the following error occurs – “In file included from c:mingwlibgccmingw329.2.0includec++extpb_dsdetailstandard_policies.hpp:45,
from c:mingwlibgccmingw329.2.0includec++extpb_dsassoc_container.hpp:47,
from 0.cpp:8:
c:mingwlibgccmingw329.2.0includec++extpb_dshash_policy.hpp:610:10: fatal error: ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp: No such file or directory
610 | #include <ext/pb_ds/detail/resize_policy/hash_standard_resize_policy_imp.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.”
I checked multiple online resources, which suggested upgrading gcc which I upgraded to gcc 9, I thought to update C++ on my compiler, but failed to do so, it shows I am using C++14. When I used “g++ ‘file_name.cpp’ -std g++=c++2a”, it threw the same error.
Can you please provide any solution.
Searched for multiple solutions, found one solution to implemet ordered_set from scratch but that would be a mess. I want to use the template.