Click here to Skip to main content
15,888,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questiondiff b/w LUID and SID Pin
sunit513-Nov-05 20:25
sunit513-Nov-05 20:25 
AnswerRe: diff b/w LUID and SID Pin
sunit513-Nov-05 21:00
sunit513-Nov-05 21:00 
QuestionIn MFC model less Dialogbox Pin
vikas amin13-Nov-05 19:24
vikas amin13-Nov-05 19:24 
AnswerRe: In MFC model less Dialogbox Pin
Mircea Puiu13-Nov-05 20:13
Mircea Puiu13-Nov-05 20:13 
AnswerRe: In MFC model less Dialogbox Pin
*Dreamz13-Nov-05 20:20
*Dreamz13-Nov-05 20:20 
GeneralRe: In MFC model less Dialogbox Pin
vikas amin13-Nov-05 21:04
vikas amin13-Nov-05 21:04 
Questionuse object itself as key in stl map Pin
yccheok13-Nov-05 19:18
yccheok13-Nov-05 19:18 
AnswerRe: use object itself as key in stl map Pin
Garth J Lancaster13-Nov-05 19:54
professionalGarth J Lancaster13-Nov-05 19:54 
I think your definition of map m is incorrect for a start...

shouldnt it be :-

map < Point, Point > m;

?? - ie you havnt told the compiler what you're storing in map m. One thing you have done (great Smile | :) ) is define the < operator for your class .. from Cprogramming.com :-

"To use the map class, you will need to include and maps are part of the std namespace. Maps require two, and possibly three, types for the template:
std::map < key_type, data_type, [comparison_function] >

Notice that the comparison function is in brackets, indicating that it is optional so long as your key_type has the less-than operator, < , defined -- so you don't need to specify a comparision function for so-called primitive types such as int, char, or even for the string class. Moreover, if you overloaded the < operator for your own class, this won't be necessary.

The reason that the key type needs the less-than operator is that the keys will be stored in sorted order -- this means that if you want to retrieve every key, value pair stored in the map, you can retrieve them in the order of the keys. "

http://www.cprogramming.com/tutorial/stl/stlmap.html[^]

[Edit]
I think you also need to define the < operator with two operands thus :-

bool operator <(const Point &LHS, const Point &RHS){
return LHS.y < RHS.y;
}
[/Edit]


'g'

-- modified at 4:49 Monday 14th November, 2005
AnswerRe: use object itself as key in stl map Pin
*Dreamz13-Nov-05 20:39
*Dreamz13-Nov-05 20:39 
GeneralRe: use object itself as key in stl map Pin
yccheok13-Nov-05 23:05
yccheok13-Nov-05 23:05 
Questionhow to make arrow keys work for help button in Cpropertysheet in MFC in VC++ Pin
simhadri13-Nov-05 18:56
simhadri13-Nov-05 18:56 
AnswerRe: how to make arrow keys work for help button in Cpropertysheet in MFC in VC++ Pin
Cool Ju13-Nov-05 22:05
Cool Ju13-Nov-05 22:05 
GeneralRe: how to make arrow keys work for help button in Cpropertysheet in MFC in VC++ Pin
simhadri22-Nov-05 17:10
simhadri22-Nov-05 17:10 
QuestionI'm Sick Of GetPixel, Any Alternative? Pin
Owner drawn13-Nov-05 18:18
Owner drawn13-Nov-05 18:18 
AnswerRe: I'm Sick Of GetPixel, Any Alternative? Pin
James Brown13-Nov-05 20:20
James Brown13-Nov-05 20:20 
QuestionThread Blocking Pin
Nishad S13-Nov-05 18:08
Nishad S13-Nov-05 18:08 
AnswerRe: Thread Blocking Pin
22491713-Nov-05 23:15
22491713-Nov-05 23:15 
GeneralRe: Thread Blocking Pin
Nishad S13-Nov-05 23:27
Nishad S13-Nov-05 23:27 
AnswerRe: Thread Blocking Pin
Steen Krogsgaard14-Nov-05 2:14
Steen Krogsgaard14-Nov-05 2:14 
GeneralRe: Thread Blocking Pin
Nishad S14-Nov-05 2:21
Nishad S14-Nov-05 2:21 
GeneralRe: Thread Blocking Pin
Steen Krogsgaard14-Nov-05 2:25
Steen Krogsgaard14-Nov-05 2:25 
QuestionPlease help Pin
rajeevktripathi13-Nov-05 18:02
rajeevktripathi13-Nov-05 18:02 
AnswerRe: Please help Pin
chamilkab13-Nov-05 18:22
chamilkab13-Nov-05 18:22 
QuestionRe: Please help Pin
rajeevktripathi13-Nov-05 21:45
rajeevktripathi13-Nov-05 21:45 
AnswerRe: Please help Pin
chamilkab13-Nov-05 22:36
chamilkab13-Nov-05 22: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.