Hi wayside,
> but in Visual Studio .Net 20003 it is in the stdext namespace instead
> of the std namespace
FYI:
That is the correct way to add objects that are not part of the official C++ std standard.
Compilers and Libraries that add non-standard object to std namespace are breaking the rules. The std namespace is suppose to be only for the official C++ standard objects.
This is why the C++ commitee has decided to change the hash_map table name when it finally gets added to the standard. They didn't want to break existing libraries and code using these bad libraries.
This is one of the rare cases, in which VC++ is actually following the standard, and compilers/libraries like GNU, are not.
David Maisonave (Axter)
Cheers!
Main Topics
Browse All Topics





by: Fippy_DarkpawPosted on 2006-12-15 at 11:43:43ID: 18148445
1) yes. Here's some GCC/Unix STL samples:
t.net/java china/faq/ stl_01.htm
http://bobcat.webappcabare
2) AFAIK no. But if you really need them sorted it would probably be easier to have an array of linked lists.
- make your own hash function which yields an index in the array of linked lists
- when you hash an object place it in the linked list at that index
- there is a built in sort() function in stl linked lists, although it would probably be more effiecient to insert new objects in their correct place