Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to pass a simple char* to a unicode binary text?? Pin
bikram singh26-Jul-04 7:53
bikram singh26-Jul-04 7:53 
GeneralODBC Database Metadata (All Table names) Pin
omair shafiq25-Jul-04 5:34
omair shafiq25-Jul-04 5:34 
GeneralRe: ODBC Database Metadata (All Table names) Pin
David Crow26-Jul-04 4:05
David Crow26-Jul-04 4:05 
GeneralC reateProcess Pin
Member 75213725-Jul-04 4:04
Member 75213725-Jul-04 4:04 
GeneralRe: C reateProcess Pin
PJ Arends25-Jul-04 10:06
professionalPJ Arends25-Jul-04 10:06 
Generalbandwidth monitoring Pin
Paolo Ponzano25-Jul-04 2:38
Paolo Ponzano25-Jul-04 2:38 
QuestionJumping out of a heavily-nested looping noy by using "goto" statement? Pin
Link260024-Jul-04 17:24
Link260024-Jul-04 17:24 
AnswerRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
Ravi Bhavnani24-Jul-04 17:52
professionalRavi Bhavnani24-Jul-04 17:52 
Alex Ngai wrote:
goto statement is evil,

It is not evil to use a goto statement when it transfers control to the end of the containing block. The C language even supplies you a couple of built-in constructs to make this easy to do - continue and break, the latter being nothing more than a continue followed by a loop terminator.

If you can't get yourself to use a goto for fear that someone will throw things at you in a code review (because they "learned in school that a goto is bad, bad, very bad"), you could instead throw an exception when you want to break out of a nested block, and take appropriate action in the catch.

Whatever you do, be sure to write a nice comment explaining what you've done. The person who ends up maintaining your code (usually yourself) will thank you for this while debugging at 3am on a winter's night. Smile | :)

/ravi

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

GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
Mike Dimmick25-Jul-04 5:30
Mike Dimmick25-Jul-04 5:30 
GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
peterchen25-Jul-04 6:13
peterchen25-Jul-04 6:13 
GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
Ravi Bhavnani25-Jul-04 12:01
professionalRavi Bhavnani25-Jul-04 12:01 
AnswerRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
Michael Dunn24-Jul-04 18:22
sitebuilderMichael Dunn24-Jul-04 18:22 
AnswerRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
Johan Rosengren24-Jul-04 20:19
Johan Rosengren24-Jul-04 20:19 
AnswerRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
bikram singh24-Jul-04 21:53
bikram singh24-Jul-04 21:53 
GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
Kevin McFarlane25-Jul-04 6:52
Kevin McFarlane25-Jul-04 6:52 
GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
bikram singh26-Jul-04 7:35
bikram singh26-Jul-04 7:35 
GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
Kevin McFarlane30-Jul-04 8:24
Kevin McFarlane30-Jul-04 8:24 
GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
bikram singh31-Jul-04 2:32
bikram singh31-Jul-04 2:32 
AnswerRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
Nemanja Trifunovic25-Jul-04 5:54
Nemanja Trifunovic25-Jul-04 5:54 
GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
David Crow26-Jul-04 4:29
David Crow26-Jul-04 4:29 
GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
Henry miller26-Jul-04 6:48
Henry miller26-Jul-04 6:48 
AnswerRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
palbano25-Jul-04 17:47
palbano25-Jul-04 17:47 
GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
Link260025-Jul-04 18:04
Link260025-Jul-04 18:04 
GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
palbano25-Jul-04 18:43
palbano25-Jul-04 18:43 
GeneralRe: Jumping out of a heavily-nested looping noy by using "goto" statement? Pin
bikram singh26-Jul-04 7:33
bikram singh26-Jul-04 7:33 

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.