Click here to Skip to main content
15,886,578 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: pls this bug Pin
Branislav3-Sep-05 22:02
Branislav3-Sep-05 22:02 
GeneralRe: pls this bug Pin
neodeaths4-Sep-05 14:41
neodeaths4-Sep-05 14:41 
AnswerRe: pls this bug Pin
normanS4-Sep-05 20:09
normanS4-Sep-05 20:09 
GeneralRe: pls this bug Pin
neodeaths5-Sep-05 7:16
neodeaths5-Sep-05 7:16 
Questionswitch vs. if Pin
JKallen3-Sep-05 16:00
JKallen3-Sep-05 16:00 
AnswerRe: switch vs. if Pin
Cliff Hatch3-Sep-05 23:10
Cliff Hatch3-Sep-05 23:10 
AnswerRe: switch vs. if Pin
Tim Smith4-Sep-05 3:30
Tim Smith4-Sep-05 3:30 
AnswerRe: switch vs. if Pin
Gary R. Wheeler4-Sep-05 5:19
Gary R. Wheeler4-Sep-05 5:19 
While there may be a valid use for goto, I've not used it in years. You can always organize your code so that it isn't necessary, and the modified code is almost invariably more robust.

I am curious. Why were you taught to not use switch? While it can be misused, overall it has its applications. Any time you have a discrete value (an enum, for example) that specifies an action, a switch statement is appropriate.

The object-oriented programming crowd would argue that you should create a class structure, and derive unique classes for each case. That approach is inefficient and overkill a lot of the time. It also makes it a lot more difficult to follow program logic.


Software Zen: delete this;
GeneralRe: switch vs. if Pin
JKallen5-Sep-05 9:58
JKallen5-Sep-05 9:58 
QuestionCObList::GetNext return Different value ??? Pin
3-Sep-05 15:34
suss3-Sep-05 15:34 
QuestionInclude <fstream.h> Pin
kenexcelon3-Sep-05 15:12
kenexcelon3-Sep-05 15:12 
AnswerRe: Include <fstream.h> Pin
Jack Puppy3-Sep-05 15:19
Jack Puppy3-Sep-05 15:19 
AnswerRe: Include &lt;fstream.h&gt; Pin
Axter3-Sep-05 15:43
professionalAxter3-Sep-05 15:43 
QuestionCRecordset &amp; LIMIT (sql statement) Pin
maTzeLein3-Sep-05 11:08
maTzeLein3-Sep-05 11:08 
QuestionProblem with Memory usage of a program Pin
rajeevktripathi3-Sep-05 3:59
rajeevktripathi3-Sep-05 3:59 
AnswerRe: Problem with Memory usage of a program Pin
Bob Stanneveld3-Sep-05 4:59
Bob Stanneveld3-Sep-05 4:59 
QuestionDifferentiating New file creation and Open in CreateFile Pin
ragavan3-Sep-05 3:51
ragavan3-Sep-05 3:51 
QuestionIcon association with non-executable file Pin
johnnyXP3-Sep-05 2:25
johnnyXP3-Sep-05 2:25 
AnswerRe: Icon association with non-executable file Pin
PJ Arends3-Sep-05 9:59
professionalPJ Arends3-Sep-05 9:59 
AnswerRe: Icon association with non-executable file Pin
Ravi Bhavnani4-Sep-05 6:44
professionalRavi Bhavnani4-Sep-05 6:44 
AnswerRe: Icon association with non-executable file Pin
Gary R. Wheeler4-Sep-05 6:50
Gary R. Wheeler4-Sep-05 6:50 
QuestionAnyone can help me about Html Help Workshop? Pin
Anonymous3-Sep-05 1:54
Anonymous3-Sep-05 1:54 
AnswerRe: Anyone can help me about Html Help Workshop? Pin
Gary R. Wheeler3-Sep-05 2:18
Gary R. Wheeler3-Sep-05 2:18 
QuestionFinding the same function in VC++ Pin
KaGeU3-Sep-05 0:09
KaGeU3-Sep-05 0:09 
AnswerRe: Finding the same function in VC++ Pin
toxcct3-Sep-05 0:29
toxcct3-Sep-05 0:29 

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.