mickeyj
mickeyj

Reputation: 101

Issue with hash_set : hash_set does not name a type

In the following code

#include <hash_set>
using namespace std;
class sample
{
public:

    sample();
    ~sample();

    private :
    hash_set <unsigned int> a;
};

I get the following error - hash_Set does not name a type. Could you please point me to what is wrong? Thanks

Upvotes: 0

Views: 892

Answers (1)

Sebastian Hoffmann
Sebastian Hoffmann

Reputation: 11482

The class you want to use is obsolete, use std::unordered_set instead. As you can still include the header you could also try to use stdext::hash_set, though this is discouraged.

Upvotes: 2

Related Questions