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

C / C++ / MFC

 
AnswerRe: wave sound ... Pin
Zac Howland1-Jun-06 5:56
Zac Howland1-Jun-06 5:56 
QuestionRe: wave sound ... Pin
David Crow1-Jun-06 7:15
David Crow1-Jun-06 7:15 
QuestionWhy have they done this? Pin
RChin1-Jun-06 5:24
RChin1-Jun-06 5:24 
AnswerRe: Why have they done this? Pin
Viorel.1-Jun-06 5:34
Viorel.1-Jun-06 5:34 
GeneralRe: Why have they done this? Pin
RChin1-Jun-06 5:41
RChin1-Jun-06 5:41 
GeneralRe: Why have they done this? [modified] Pin
Zac Howland1-Jun-06 5:52
Zac Howland1-Jun-06 5:52 
GeneralRe: Why have they done this? [modified] Pin
RChin1-Jun-06 5:56
RChin1-Jun-06 5:56 
AnswerRe: Why have they done this? [modified] Pin
James R. Twine1-Jun-06 8:08
James R. Twine1-Jun-06 8:08 
   An excellent explaination!  However, I will offer one more use of the do/while(0) block.  I have seen it used as a way to provide goto-like functionality without actually using the word goto.

   For example, if you needed to jump out of the middle of the block, simply executing a break will take you to the bottom of the block, simulating a goto to a label at the end of the block.

   It was a bit confusing the first time I saw code that used the do/while(0) like that...

[Edit: Note, I do not do this myself, and would use (and have used) used a goto in place of something like that...]

   Peace!

-=- James
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
DeleteFXPFiles & CheckFavorites
(Please rate this post!)
GeneralRe: Why have they done this? [modified] Pin
Blake Miller1-Jun-06 8:18
Blake Miller1-Jun-06 8:18 
GeneralRe: Why have they done this? [modified] Pin
Zac Howland1-Jun-06 8:46
Zac Howland1-Jun-06 8:46 
AnswerRe: Why have they done this? Pin
toxcct1-Jun-06 5:46
toxcct1-Jun-06 5:46 
QuestionSDL window in MFC application. Pin
Manjunath S1-Jun-06 5:22
Manjunath S1-Jun-06 5:22 
QuestionRe: SDL window in MFC application. Pin
Hamid_RT1-Jun-06 5:51
Hamid_RT1-Jun-06 5:51 
AnswerRe: SDL window in MFC application. Pin
Cedric Moonen1-Jun-06 6:05
Cedric Moonen1-Jun-06 6:05 
GeneralRe: SDL window in MFC application. Pin
Hamid_RT1-Jun-06 6:10
Hamid_RT1-Jun-06 6:10 
GeneralRe: SDL window in MFC application. Pin
Cedric Moonen1-Jun-06 6:11
Cedric Moonen1-Jun-06 6:11 
GeneralRe: SDL window in MFC application. Pin
Hamid_RT1-Jun-06 20:02
Hamid_RT1-Jun-06 20:02 
AnswerRe: SDL window in MFC application. [modified] Pin
toxcct1-Jun-06 6:19
toxcct1-Jun-06 6:19 
GeneralRe: SDL window in MFC application. Pin
David Crow1-Jun-06 7:21
David Crow1-Jun-06 7:21 
GeneralRe: SDL window in MFC application. Pin
toxcct1-Jun-06 7:24
toxcct1-Jun-06 7:24 
GeneralRe: SDL window in MFC application. Pin
ThatsAlok1-Jun-06 19:12
ThatsAlok1-Jun-06 19:12 
QuestionCString/strcpy error Pin
kitty51-Jun-06 5:07
kitty51-Jun-06 5:07 
AnswerRe: CString/strcpy error [modified] Pin
Viorel.1-Jun-06 5:15
Viorel.1-Jun-06 5:15 
AnswerRe: CString/strcpy error Pin
Karthickg1-Jun-06 5:18
Karthickg1-Jun-06 5:18 
AnswerRe: CString/strcpy error Pin
Zac Howland1-Jun-06 5:41
Zac Howland1-Jun-06 5:41 

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.