Click here to Skip to main content
15,910,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionwhy no dot h? Pin
includeh1014-Aug-02 14:33
includeh1014-Aug-02 14:33 
AnswerRe: why no dot h? Pin
Nick Hodapp14-Aug-02 14:36
sitebuilderNick Hodapp14-Aug-02 14:36 
AnswerRe: why no dot h? Pin
Christian Graus14-Aug-02 17:35
protectorChristian Graus14-Aug-02 17:35 
Questionmystery or stupid? Pin
includeh1014-Aug-02 13:56
includeh1014-Aug-02 13:56 
AnswerRe: mystery or stupid? Pin
Nick Hodapp14-Aug-02 14:31
sitebuilderNick Hodapp14-Aug-02 14:31 
GeneralRe: mystery or stupid? Pin
includeh1014-Aug-02 14:36
includeh1014-Aug-02 14:36 
GeneralRe: mystery or stupid? Pin
Christian Graus14-Aug-02 17:37
protectorChristian Graus14-Aug-02 17:37 
AnswerRe: mystery or stupid? Pin
Steen Krogsgaard15-Aug-02 3:30
Steen Krogsgaard15-Aug-02 3:30 
Although I agree with Nick and Christian that the strlen should be out of the loop I also think it's really besides the point.

You're wondering how 0 + 0 gets to be 8570, right? And putting strlen inside a loop here is just for testing purposes, right? You would never put strlen inside a loop in your final program, right? Wink | ;) Promise?;P

Anyway, I can't see anything "wrong" with the code (except that you didn't put it into pre-tags which greatly improves readability Wink | ;) ). I put it into my VC++6.0, and got pp. 4200 ms for both lines and app. half for each of the lines alone - all in debug builds. In release builds all timings were 0 msecs.

My best shot would be that optimization is playing you a trick. Are you sure all optimizations are turned off? Or perhaps some of your other code only forces the optimizer to keep the code when both lines are present.

I'm probably wrong, but hey, that's the story of my life.

Cheers
Steen.

"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
AnswerRe: mystery or stupid? Pin
Philippe Mori15-Aug-02 9:43
Philippe Mori15-Aug-02 9:43 
GeneralMemory Allocation :: C/C++ Pin
valikac14-Aug-02 13:27
valikac14-Aug-02 13:27 
GeneralRe: Memory Allocation :: C/C++ Pin
Bill Wilson14-Aug-02 13:36
Bill Wilson14-Aug-02 13:36 
GeneralRe: Memory Allocation :: C/C++ Pin
jmkhael14-Aug-02 13:41
jmkhael14-Aug-02 13:41 
GeneralRe: Memory Allocation :: C/C++ Pin
valikac14-Aug-02 13:50
valikac14-Aug-02 13:50 
GeneralRe: Memory Allocation :: C/C++ Pin
Stuart Dootson14-Aug-02 20:44
professionalStuart Dootson14-Aug-02 20:44 
GeneralRe: Memory Allocation :: C/C++ Pin
Rutger Ellen14-Aug-02 22:07
Rutger Ellen14-Aug-02 22:07 
GeneralRe: Memory Allocation :: C/C++ Pin
valikac15-Aug-02 5:43
valikac15-Aug-02 5:43 
GeneralCHTMLView Pin
Wolfram Steinke14-Aug-02 13:16
Wolfram Steinke14-Aug-02 13:16 
GeneralChanging Font Color Pin
slackboy14-Aug-02 12:57
slackboy14-Aug-02 12:57 
GeneralRe: Changing Font Color Pin
PJ Arends14-Aug-02 13:06
professionalPJ Arends14-Aug-02 13:06 
GeneralDouble Byte Characters in win32 controls. Pin
djrisc14-Aug-02 10:38
djrisc14-Aug-02 10:38 
GeneralDouble Byte Characters in win32 controls. Pin
djrisc14-Aug-02 13:21
djrisc14-Aug-02 13:21 
GeneralRe: Double Byte Characters in win32 controls. Pin
Michael Dunn14-Aug-02 14:57
sitebuilderMichael Dunn14-Aug-02 14:57 
GeneralRe: Double Byte Characters in win32 controls. Pin
djrisc14-Aug-02 20:22
djrisc14-Aug-02 20:22 
GeneralWrapping windows dialogues around old DOS programs Pin
Malcolm Crawford14-Aug-02 10:24
Malcolm Crawford14-Aug-02 10:24 
GeneralLoadLibrary Error Pin
Michael_Petrov14-Aug-02 10:02
sussMichael_Petrov14-Aug-02 10:02 

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.