Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / id system for dll

Author
Message
chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 19th Apr 2008 23:10
does anyone know how to make an id system for this, ive already tried a stl map but it doesn`t work.

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 19th Apr 2008 23:13
You must have done it wrong then A map works perfectly for an ID system

chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 19th Apr 2008 23:25
how do you do it with pointers eg. mymp3=loadmp3"test.mp3", any ideas
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Apr 2008 23:30
It does indeed. If you don't mind that you can't iterate through id's in sequence, hash_map provides the identical functionality and is faster too.

chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 19th Apr 2008 23:49
here`s the code can anyone see what im doing wrong i can get it to work with out the map like the code in my first post




here is the errors


IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Apr 2008 00:06
Rather than try and fix your code when I don't really know what you want, here are selected excerpts from one of my DLLs, modified for clarity:


I generally typedef things like this as it puts the map definition into a single location and makes it easier to change later - something you'll notice quite quickly if you use iterators (I typedef them too).

chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 20th Apr 2008 00:31
works! thanks man,once again you have pointed me in the right direction.


thanks chunks

Login to post a reply

Server time is: 2024-02-21 01:54:26
Your offset time is: 2024-02-21 01:54:26