Click here to Skip to main content
15,891,017 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHi Everyone Pin
Rassul Yunussov15-Mar-05 18:14
Rassul Yunussov15-Mar-05 18:14 
GeneralRe: Hi Everyone Pin
John R. Shaw16-Mar-05 12:34
John R. Shaw16-Mar-05 12:34 
GeneralCrossWord puzzle alogrithm Pin
Mohsen Saad15-Mar-05 18:02
Mohsen Saad15-Mar-05 18:02 
GeneralRe: CrossWord puzzle alogrithm Pin
Ravi Bhavnani16-Mar-05 3:39
professionalRavi Bhavnani16-Mar-05 3:39 
GeneralTHE USE OF "cout statement inside the for loop" Pin
phijophlip15-Mar-05 17:56
phijophlip15-Mar-05 17:56 
GeneralRe: THE USE OF "cout statement inside the for loop" Pin
Serge Krynine15-Mar-05 18:54
Serge Krynine15-Mar-05 18:54 
GeneralRe: THE USE OF "cout statement inside the for loop" Pin
namaskaaram15-Mar-05 18:59
namaskaaram15-Mar-05 18:59 
General(modified) THE USE OF "cout statement inside the for loop" Pin
normanS15-Mar-05 19:12
normanS15-Mar-05 19:12 
An interesting question.

I would guess (but it is only a guess) that there will be no difference, i.e. the compiler will reduce them to about the same code, so the CPU speed, memory management, etc will all be about the same.

((I stand corrected, having seen the other replies. Unfortunately I could not do the obvious check - running them - since my office PC does not have C++ installed. I think the rest of the comments below are still valid, however!))

To find differences in timing, you could use both approaches, but check performance using the profiler. This may force you to use debug version, and turn off optimisation, so it may give you misleading results.

To check memory management, etc, you could compile with the "generate assembler listing" option ON, and compare the resulting listings.
GeneralRe: THE USE OF "cout statement inside the for loop" Pin
David Crow16-Mar-05 3:09
David Crow16-Mar-05 3:09 
GeneralNeed Help for writing event log with more than one parameter Pin
Amy Yang15-Mar-05 17:41
Amy Yang15-Mar-05 17:41 
GeneralRe: Need Help for writing event log with more than one parameter Pin
David Crow16-Mar-05 3:28
David Crow16-Mar-05 3:28 
GeneralRe: Need Help for writing event log with more than one parameter Pin
Amy Yang16-Mar-05 3:49
Amy Yang16-Mar-05 3:49 
GeneralRe: Need Help for writing event log with more than one parameter Pin
David Crow16-Mar-05 3:57
David Crow16-Mar-05 3:57 
GeneralRe: Need Help for writing event log with more than one parameter Pin
cmk16-Mar-05 16:45
cmk16-Mar-05 16:45 
GeneralRe: Need Help for writing event log with more than one parameter Pin
Amy Yang16-Mar-05 17:54
Amy Yang16-Mar-05 17:54 
GeneralMax Range For Some Constants Pin
IceBerG7115-Mar-05 16:02
IceBerG7115-Mar-05 16:02 
GeneralRe: Max Range For Some Constants Pin
Serge Krynine15-Mar-05 16:22
Serge Krynine15-Mar-05 16:22 
GeneralAbort capture screen Pin
Jack.Fu15-Mar-05 15:06
Jack.Fu15-Mar-05 15:06 
GeneralRe: Abort capture screen Pin
Christian Graus15-Mar-05 15:21
protectorChristian Graus15-Mar-05 15:21 
GeneralRe: Abort capture screen Pin
FlyingTinman15-Mar-05 15:53
FlyingTinman15-Mar-05 15:53 
GeneralRe: Abort capture screen Pin
Member 161799927-May-05 7:13
Member 161799927-May-05 7:13 
GeneralRe: Abort capture screen Pin
FlyingTinman27-May-05 8:18
FlyingTinman27-May-05 8:18 
QuestionHow to get a pixel's RGB value. Pin
Francis Chau15-Mar-05 14:41
Francis Chau15-Mar-05 14:41 
AnswerRe: How to get a pixel's RGB value. Pin
Christian Graus15-Mar-05 15:02
protectorChristian Graus15-Mar-05 15:02 
GeneralRe: How to get a pixel's RGB value. Pin
Francis Chau15-Mar-05 15:35
Francis Chau15-Mar-05 15:35 

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.