Click here to Skip to main content
15,885,914 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: resource compiler rc2188 error Pin
Richard MacCutchan26-Jun-12 4:25
mveRichard MacCutchan26-Jun-12 4:25 
GeneralRe: resource compiler rc2188 error Pin
ForNow26-Jun-12 6:28
ForNow26-Jun-12 6:28 
GeneralRe: resource compiler rc2188 error Pin
Richard MacCutchan26-Jun-12 7:07
mveRichard MacCutchan26-Jun-12 7:07 
GeneralRe: resource compiler rc2188 error Pin
ForNow26-Jun-12 12:30
ForNow26-Jun-12 12:30 
GeneralRe: resource compiler rc2188 error Pin
ForNow26-Jun-12 13:21
ForNow26-Jun-12 13:21 
Questionsort a map by Value Pin
NajaR1225-Jun-12 23:00
NajaR1225-Jun-12 23:00 
AnswerRe: sort a map by Value Pin
Chandrasekharan P26-Jun-12 0:21
Chandrasekharan P26-Jun-12 0:21 
AnswerRe: sort a map by Value Pin
Roger Stoltz26-Jun-12 0:34
Roger Stoltz26-Jun-12 0:34 
NajaR12 wrote:
Can anybody tell me how to sort a map based on the values.

Why do you want to do that?
Your desire suggests that you have misunderstood the purpose of a map.
The key is supposed to be unique and the value is identified by its corresponding key so you may write code such as in order to retrieve the "box" associated with the key:
C++
Box& box = Map[key];


However, if your "boxes" are unique you may use them as keys, e.g.:
C++
Map[box1] = key2;
Map[box2] = key4;
Map[box3] = key1;
Map[box4] = key3;

Consider using a std::list that is entry-sorted.

"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


AnswerRe: sort a map by Value Pin
Chris Losinger26-Jun-12 1:14
professionalChris Losinger26-Jun-12 1:14 
QuestionError CXX0052: Member function not found Pin
AmbiguousName25-Jun-12 19:26
AmbiguousName25-Jun-12 19:26 
SuggestionRe: Error CXX0052: Member function not found Pin
Binu MD25-Jun-12 20:24
Binu MD25-Jun-12 20:24 
AnswerRe: Error CXX0052: Member function not found Pin
Richard MacCutchan25-Jun-12 22:06
mveRichard MacCutchan25-Jun-12 22:06 
AnswerRe: Error CXX0052: Member function not found Pin
fat_boy26-Jun-12 3:10
fat_boy26-Jun-12 3:10 
QuestionFastest form of Interprocess communication Pin
ForNow25-Jun-12 6:44
ForNow25-Jun-12 6:44 
AnswerRe: Fastest form of Interprocess communication Pin
Albert Holguin25-Jun-12 7:24
professionalAlbert Holguin25-Jun-12 7:24 
QuestionHow to get the temperature from my aplication? Pin
MroMarcosKim25-Jun-12 6:01
MroMarcosKim25-Jun-12 6:01 
AnswerRe: How to get the temperature from my aplication? Pin
Software_Developer25-Jun-12 6:24
Software_Developer25-Jun-12 6:24 
QuestionThis class and its members cannot be used in applications that execute in the Windows Runtime. Pin
bob1697225-Jun-12 5:10
bob1697225-Jun-12 5:10 
AnswerRe: This class and its members cannot be used in applications that execute in the Windows Runtime. Pin
Albert Holguin25-Jun-12 7:36
professionalAlbert Holguin25-Jun-12 7:36 
GeneralRe: This class and its members cannot be used in applications that execute in the Windows Runtime. Pin
bob1697225-Jun-12 9:02
bob1697225-Jun-12 9:02 
GeneralRe: This class and its members cannot be used in applications that execute in the Windows Runtime. Pin
Albert Holguin25-Jun-12 12:38
professionalAlbert Holguin25-Jun-12 12:38 
Questionerror C2660 :,, opencv with mfc (Solved) Pin
jawadali47724-Jun-12 19:34
jawadali47724-Jun-12 19:34 
AnswerRe: error C2660 :,, opencv with mfc Pin
«_Superman_»24-Jun-12 19:47
professional«_Superman_»24-Jun-12 19:47 
AnswerRe: error C2660 :,, opencv with mfc Pin
SoMad24-Jun-12 19:53
professionalSoMad24-Jun-12 19:53 
AnswerRe: error C2660 :,, opencv with mfc Pin
fat_boy24-Jun-12 21:54
fat_boy24-Jun-12 21:54 

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.