Click here to Skip to main content
15,901,426 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: custom control - how can you get mouse messages? Pin
Cathy6-Jun-02 11:59
Cathy6-Jun-02 11:59 
GeneralRe: custom control - how can you get mouse messages? Pin
Daniel Ferguson6-Jun-02 15:10
Daniel Ferguson6-Jun-02 15:10 
GeneralRe: custom control - how can you get mouse messages? Pin
Cathy6-Jun-02 19:56
Cathy6-Jun-02 19:56 
AnswerRe: custom control - how can you get mouse messages? Pin
aldeba8-Jun-02 21:55
aldeba8-Jun-02 21:55 
GeneralRe: custom control - how can you get mouse messages? Pin
Cathy9-Jun-02 6:35
Cathy9-Jun-02 6:35 
GeneralMultimap Error Pin
Sidney6-Jun-02 9:11
Sidney6-Jun-02 9:11 
GeneralRe: Multimap Error Pin
Joaquín M López Muñoz6-Jun-02 9:18
Joaquín M López Muñoz6-Jun-02 9:18 
GeneralRe: Multimap Error Pin
Sidney6-Jun-02 11:08
Sidney6-Jun-02 11:08 
I used the #include <map> and I got 14 WARNINGS to many to enumarate it here Smile | :)

but <map> is for map only right? or is it the same file that I shall include if I used multimap?

here's my code after I changed it to <map>:

#include <string>
#include <iostream>
#include <map>
using namespace std;

struct ltstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) < 0;
}
};


int main()
{
multimap<const char*, int, ltstr> m;

m.insert(pair<const char* const, int>("a", 1));
m.insert(pair<const char* const, int>("c", 2));
m.insert(pair<const char* const, int>("b", 3));
m.insert(pair<const char* const, int>("b", 4));
m.insert(pair<const char* const, int>("a", 5));
m.insert(pair<const char* const, int>("b", 6));

cout << "Number of elements with key a: " << m.count("a") << endl;
cout << "Number of elements with key b: " << m.count("b") << endl;
cout << "Number of elements with key c: " << m.count("c") << endl;

cout << "Elements in m: " << endl;
for (multimap<const char*, int, ltstr>::iterator it = m.begin();
it != m.end();
++it)
cout << " [" << (*it).first << ", " << (*it).second << "]" << endl;
}

Thanks/Regards
Sidney
GeneralRe: Multimap Error Pin
Christian Graus6-Jun-02 11:38
protectorChristian Graus6-Jun-02 11:38 
GeneralRe: Multimap Error Pin
Sidney6-Jun-02 12:18
Sidney6-Jun-02 12:18 
GeneralRe: Multimap Error Pin
Christian Graus6-Jun-02 12:48
protectorChristian Graus6-Jun-02 12:48 
GeneralRe: Multimap Error Pin
Sidney6-Jun-02 13:11
Sidney6-Jun-02 13:11 
GeneralRemoveAll question Pin
6-Jun-02 8:57
suss6-Jun-02 8:57 
GeneralRe: RemoveAll question Pin
Chris Losinger6-Jun-02 9:09
professionalChris Losinger6-Jun-02 9:09 
Questionhow to do flicker-free drawing using memory DC Pin
lucy6-Jun-02 9:04
lucy6-Jun-02 9:04 
AnswerRe: how to do flicker-free drawing using memory DC Pin
Chris Losinger6-Jun-02 9:08
professionalChris Losinger6-Jun-02 9:08 
GeneralRe: how to do flicker-free drawing using memory DC Pin
lucy6-Jun-02 9:19
lucy6-Jun-02 9:19 
GeneralRe: how to do flicker-free drawing using memory DC Pin
lucy6-Jun-02 9:28
lucy6-Jun-02 9:28 
GeneralRe: how to do flicker-free drawing using memory DC Pin
lucy6-Jun-02 9:41
lucy6-Jun-02 9:41 
GeneralRe: how to do flicker-free drawing using memory DC Pin
lucy6-Jun-02 10:00
lucy6-Jun-02 10:00 
GeneralRe: how to do flicker-free drawing using memory DC Pin
Ernest Laurentin6-Jun-02 10:10
Ernest Laurentin6-Jun-02 10:10 
GeneralRe: how to do flicker-free drawing using memory DC Pin
lucy6-Jun-02 10:28
lucy6-Jun-02 10:28 
AnswerRe: how to do flicker-free drawing using memory DC Pin
Chen Venkataraman6-Jun-02 9:50
Chen Venkataraman6-Jun-02 9:50 
GeneralOpen port + Process Pin
orcun colak6-Jun-02 8:55
orcun colak6-Jun-02 8:55 
GeneralMultithreading & Problem :: MFC Pin
valikac6-Jun-02 7:36
valikac6-Jun-02 7:36 

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.