Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCPropertyPage and CDialog Pin
Yaron Abershitz19-Mar-05 19:43
Yaron Abershitz19-Mar-05 19:43 
GeneralRe: CPropertyPage and CDialog Pin
Renjith Ramachandran20-Mar-05 16:06
Renjith Ramachandran20-Mar-05 16:06 
GeneralVisual C++.Net - Alternative to Large Switch Case Pin
JSadleir19-Mar-05 13:42
JSadleir19-Mar-05 13:42 
GeneralRe: Visual C++.Net - Alternative to Large Switch Case Pin
Member 30761219-Mar-05 20:22
Member 30761219-Mar-05 20:22 
GeneralRe: Visual C++.Net - Alternative to Large Switch Case Pin
Mike Dimmick19-Mar-05 22:53
Mike Dimmick19-Mar-05 22:53 
GeneralRe: Visual C++.Net - Alternative to Large Switch Case Pin
Ravi Bhavnani20-Mar-05 5:41
professionalRavi Bhavnani20-Mar-05 5:41 
GeneralRe: Visual C++.Net - Alternative to Large Switch Case Pin
Blake Miller21-Mar-05 5:36
Blake Miller21-Mar-05 5:36 
GeneralRe: Visual C++.Net - Alternative to Large Switch Case Pin
Ravi Bhavnani21-Mar-05 6:40
professionalRavi Bhavnani21-Mar-05 6:40 
Blake Miller wrote:
You still have to get the valuess INTO the map, so how does that provide any gains over the switch statement?


The gains are in the area of maintenance, not necessarily performance.

  1. For large switch statements a map lookup is easier to understand and therefore easier to maintain.
  2. A map lookup is more robust (i.e. less error-prone, dure to factoring) if the switch is needed more than once.
  3. As you have already pointed out, a map allows run-time initialization and is therefore more flexible.
/ravi

My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com

GeneralJabber protocol Pin
Anonymous19-Mar-05 12:42
Anonymous19-Mar-05 12:42 
GeneralRe: Jabber protocol Pin
ThatsAlok20-Mar-05 18:22
ThatsAlok20-Mar-05 18:22 
QuestionUsing command-line? Pin
dSolariuM19-Mar-05 10:34
dSolariuM19-Mar-05 10:34 
AnswerRe: Using command-line? Pin
gamitech19-Mar-05 23:39
gamitech19-Mar-05 23:39 
QuestionHi~ How use CodeProject?? Pin
KonyangUni19-Mar-05 7:41
KonyangUni19-Mar-05 7:41 
GeneralTrackbar Pin
henry12819-Mar-05 5:57
henry12819-Mar-05 5:57 
GeneralDigital Signature Pin
pranavamhari19-Mar-05 3:10
pranavamhari19-Mar-05 3:10 
GeneralRe: Digital Signature Pin
Michael Dunn20-Mar-05 6:00
sitebuilderMichael Dunn20-Mar-05 6:00 
GeneralRe: Digital Signature Pin
pranavamhari20-Mar-05 14:56
pranavamhari20-Mar-05 14:56 
GeneralAPI: which enlists the devices Pin
brilliant10119-Mar-05 1:33
brilliant10119-Mar-05 1:33 
GeneralRe: API: which enlists the devices Pin
Alexander M.,19-Mar-05 4:41
Alexander M.,19-Mar-05 4:41 
GeneralSetting System Time Pin
gopalkr19-Mar-05 0:13
gopalkr19-Mar-05 0:13 
GeneralRe: Setting System Time Pin
ThatsAlok19-Mar-05 2:38
ThatsAlok19-Mar-05 2:38 
Questionhow to use set in snmp Pin
narasimhavarmap18-Mar-05 19:39
narasimhavarmap18-Mar-05 19:39 
Generalsocket pming using multi threading Pin
tintust18-Mar-05 18:45
tintust18-Mar-05 18:45 
GeneralRe: socket pming using multi threading Pin
Alexander M.,19-Mar-05 4:44
Alexander M.,19-Mar-05 4:44 
GeneralRe: socket pming using multi threading Pin
gamitech19-Mar-05 23:45
gamitech19-Mar-05 23:45 

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.