Page 1 of 1

CEGUICommonFileDialog

Posted: Wed Jan 11, 2006 17:05
by pabloa
I was trying understand the File Dialog, from the ogre wiki... http://www.ogre3d.org/wiki/index.php/CE ... FileDialog
but when I add al the files and copy the demo some errors appear. All of them in CEGUICommonFileDialog.h, a syntaxis error in line:

Code: Select all

   hash_map<string, _Path*> _currentPaths;


Some help!

Re: CEGUICommonFileDialog

Posted: Thu Jan 12, 2006 01:33
by baxissimo
hash_map is a non-standard STL container. (Or at least it was until recently. Maybe it's official now).

Anyway, the interface is identical to std::map, only the implementation is different. So you should be able to just replace "hash_map" with "map" everywhere you see it.

The difference between the two is that hash_map stores things in a hash table so that you get expected O(1) lookup and insertion. map uses a balanced tree so lookup and insertion are O(log N). Unless the number of items in the hash_map is close to a bazillion, or the code is doing thousands of lookups per second, you probably won't notice the difference in speed at all.

Re: CEGUICommonFileDialog

Posted: Thu Jan 12, 2006 09:03
by pabloa
replace "hash_map" with "map" is not the solution.

Re: CEGUICommonFileDialog

Posted: Thu Jan 12, 2006 23:44
by baxissimo
Oh well.

Posted: Tue Jul 15, 2008 13:11
by vitefalcon
I don't know if you've already solved this..
The real problem is that MS has put hash_map to a different namespace called stdext.

Doing this should help you solve it...

Code: Select all

#include <hash_map>
using namespace stdext;


Hope this helps someone.