Click here to Skip to main content
16,005,552 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAssert Modal Dialog wincore.cpp Pin
zqueezy16-Sep-07 11:19
zqueezy16-Sep-07 11:19 
AnswerRe: Assert Modal Dialog wincore.cpp Pin
Hamid_RT16-Sep-07 19:19
Hamid_RT16-Sep-07 19:19 
GeneralRe: Assert Modal Dialog wincore.cpp Pin
zqueezy16-Sep-07 20:40
zqueezy16-Sep-07 20:40 
GeneralRe: Assert Modal Dialog wincore.cpp Pin
Roger Broomfield16-Sep-07 22:05
Roger Broomfield16-Sep-07 22:05 
QuestionTime delay Pin
pourang16-Sep-07 10:59
pourang16-Sep-07 10:59 
AnswerRe: Time delay Pin
Garth J Lancaster16-Sep-07 12:52
professionalGarth J Lancaster16-Sep-07 12:52 
GeneralRe: Time delay Pin
pourang16-Sep-07 23:14
pourang16-Sep-07 23:14 
AnswerRe: Time delay Pin
David Crow17-Sep-07 3:08
David Crow17-Sep-07 3:08 
pourang wrote:
What i can't understand is the role of clock() in the while loop


clock() does the same thing whether it is in a loop or not.

pourang wrote:
clock_t start = clock();
while (clock()- start < delay ) // wait until time elapses
; // note the semicolon


Each time this loop executes, the difference between clock() and start increases (by some small amount). While that amount is less than delay, the loop continues.


"A good athlete is the result of a good and worthy opponent." - David Crow

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


GeneralRe: Time delay Pin
pourang17-Sep-07 6:28
pourang17-Sep-07 6:28 
Questionerror message meaning Pin
jada092316-Sep-07 10:32
jada092316-Sep-07 10:32 
AnswerRe: error message meaning Pin
Michael Dunn16-Sep-07 15:59
sitebuilderMichael Dunn16-Sep-07 15:59 
QuestionRe: error message meaning Pin
David Crow17-Sep-07 3:11
David Crow17-Sep-07 3:11 
QuestionMemory leaks with malloc/realloc . . . Pin
madpuppy16-Sep-07 6:31
madpuppy16-Sep-07 6:31 
AnswerRe: Memory leaks with malloc/realloc . . . Pin
Mark Salsbery16-Sep-07 7:45
Mark Salsbery16-Sep-07 7:45 
GeneralRe: Memory leaks with malloc/realloc . . . Pin
DevMentor.org17-Sep-07 4:47
DevMentor.org17-Sep-07 4:47 
GeneralRe: Memory leaks with malloc/realloc . . . Pin
Mark Salsbery17-Sep-07 6:42
Mark Salsbery17-Sep-07 6:42 
Questionmessage-handler function for popup menu created at runtime Pin
blackbondi16-Sep-07 5:40
blackbondi16-Sep-07 5:40 
AnswerRe: message-handler function for popup menu created at runtime Pin
Abdellatif_El_Khlifi23-Sep-07 13:02
Abdellatif_El_Khlifi23-Sep-07 13:02 
QuestionCStatic usage of bitmaps... Pin
charlieg16-Sep-07 3:20
charlieg16-Sep-07 3:20 
AnswerRe: CStatic usage of bitmaps... Pin
Mark Salsbery16-Sep-07 7:57
Mark Salsbery16-Sep-07 7:57 
GeneralRe: CStatic usage of bitmaps... Pin
charlieg16-Sep-07 9:28
charlieg16-Sep-07 9:28 
QuestionCan I construct CBitmap from heap Pin
m1m216-Sep-07 1:21
m1m216-Sep-07 1:21 
AnswerRe: Can I construct CBitmap from heap Pin
Mark Salsbery16-Sep-07 8:01
Mark Salsbery16-Sep-07 8:01 
GeneralRe: Can I construct CBitmap from heap Pin
m1m216-Sep-07 10:31
m1m216-Sep-07 10:31 
Questionundefined reference to `InitCommonControlsEx@4' ERROR Pin
$w0rdf1$h16-Sep-07 0:54
$w0rdf1$h16-Sep-07 0: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.