newbie Q: how to use stl hash_set in gcc3.4.4

Z

zl2k

hi, there

Can someone let me know how may I use the stl hash_set in gcc3.4.4?
Here is my code:
======================
#include <ext/hash_set>

using namespace std;

int main (void)
{
hash_set<int> hs; //error message "`hash_set' undeclared (first use
this function)"
return 0;
}
======================
Thanks ahead.

zl2k
 
M

Mark P

zl2k said:
hi, there

Can someone let me know how may I use the stl hash_set in gcc3.4.4?
Here is my code:
======================
#include <ext/hash_set>

using namespace std;

int main (void)
{
hash_set<int> hs; //error message "`hash_set' undeclared (first use
this function)"
return 0;
}
======================
Thanks ahead.

zl2k

Probably your system (rightly) puts hash_table in a namespace other than
std. You can look in your system's include directories to see how it's
defined. I'm using an older version of gcc and it looks like it's
within namespace __gnu_cxx

-Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top