Click here to Skip to main content
16,010,876 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAssociative Arrays? Pin
Jon Hulatt22-Mar-02 1:09
Jon Hulatt22-Mar-02 1:09 
AnswerRe: Associative Arrays? Pin
Tomasz Sowinski22-Mar-02 1:21
Tomasz Sowinski22-Mar-02 1:21 
GeneralRe: Associative Arrays? Pin
Jon Hulatt22-Mar-02 2:58
Jon Hulatt22-Mar-02 2:58 
GeneralRe: Associative Arrays? Pin
Jon Hulatt22-Mar-02 2:59
Jon Hulatt22-Mar-02 2:59 
GeneralRe: Associative Arrays? Pin
Tomasz Sowinski22-Mar-02 3:00
Tomasz Sowinski22-Mar-02 3:00 
GeneralRe: Associative Arrays? Pin
Tomasz Sowinski22-Mar-02 3:04
Tomasz Sowinski22-Mar-02 3:04 
GeneralRe: Associative Arrays? Pin
Jon Hulatt22-Mar-02 3:32
Jon Hulatt22-Mar-02 3:32 
GeneralRe: Associative Arrays? Pin
Christian Graus22-Mar-02 10:29
protectorChristian Graus22-Mar-02 10:29 
Jon Hulatt wrote:
I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!

I think I found my new sig.

I'll just mention that it's easier to insert into a map like this:

l[CString("bob")] = 20;
l[CString("alf")] = 23;

You can also extract like this, but the downside is if the item you try to extract does not exist, it will be created, so you need to do this:

if (l.end() != l.find(Cstring("bob")))
assert(20 == l[CString("bob")]);

You've inspired me, I'll finally pull it together and write my set/map article today.

P.S. when you post STL code or anything else that uses templates, don't forget to turn off HTML in the post, so all the code is posted.


Christian

The tragedy of cyberspace - that so much can travel so far, and yet mean so little.

"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
GeneralConfused by WM_SIZING Pin
Hans Ruck22-Mar-02 1:02
Hans Ruck22-Mar-02 1:02 
GeneralRe: Confused by WM_SIZING Pin
Tomasz Sowinski22-Mar-02 1:37
Tomasz Sowinski22-Mar-02 1:37 
GeneralRe: Confused by WM_SIZING Pin
Hans Ruck22-Mar-02 1:45
Hans Ruck22-Mar-02 1:45 
GeneralRe: Confused by WM_SIZING Pin
Tomasz Sowinski22-Mar-02 1:54
Tomasz Sowinski22-Mar-02 1:54 
GeneralRe: Confused by WM_SIZING Pin
Hans Ruck22-Mar-02 1:51
Hans Ruck22-Mar-02 1:51 
GeneralRe: Confused by WM_SIZING Pin
Tomasz Sowinski22-Mar-02 2:01
Tomasz Sowinski22-Mar-02 2:01 
GeneralRe: Confused by WM_SIZING Pin
Hans Ruck22-Mar-02 2:02
Hans Ruck22-Mar-02 2:02 
GeneralRe: Confused by WM_SIZING Pin
Tomasz Sowinski22-Mar-02 2:39
Tomasz Sowinski22-Mar-02 2:39 
GeneralRe: Confused by WM_SIZING Pin
Hans Ruck22-Mar-02 3:00
Hans Ruck22-Mar-02 3:00 
Generalencyption demo Pin
22-Mar-02 1:01
suss22-Mar-02 1:01 
GeneralChanging color of item in list control Pin
Ganesh Ramaswamy22-Mar-02 1:00
Ganesh Ramaswamy22-Mar-02 1:00 
GeneralRe: Changing color of item in list control Pin
Tomasz Sowinski22-Mar-02 1:23
Tomasz Sowinski22-Mar-02 1:23 
GeneralRe: Changing color of item in list control Pin
Ganesh Ramaswamy22-Mar-02 2:44
Ganesh Ramaswamy22-Mar-02 2:44 
GeneralRe: Changing color of item in list control Pin
Tomasz Sowinski22-Mar-02 2:42
Tomasz Sowinski22-Mar-02 2:42 
GeneralRe: Changing color of item in list control Pin
Michael Dunn22-Mar-02 4:59
sitebuilderMichael Dunn22-Mar-02 4:59 
QuestionATL question ??? Pin
jancsi22-Mar-02 0:27
jancsi22-Mar-02 0:27 
AnswerRe: ATL question ??? Pin
Tim Smith22-Mar-02 3:33
Tim Smith22-Mar-02 3:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.