wierd optimization action....

Started by
10 comments, last by NegativeGeForce 19 years, 11 months ago
Differences between debug and release mode are usually caused due to (not) initialized variables.

In debug-mode, all variables are usually initialized automatically, but on release mode they just stay unchanged.

check your code for such cases, helps most of the time.
-----The scheduled downtime is omitted cause of technical problems.
Advertisement
quote:Original post by RuneLancer
quote:Original post by Fruny
Bad idea. You''re better off creating a .pif file for your app.

Care to elaborate?


PIF files are files that are/were used to control properties of DOS programs when run in Windows - though you can use them to some extent with windows console apps. These properties include, among other things ''Close window on exit''. Even if you don''t use that, it is trivial to create an auxiliary program (e.g. a batch file) that will call your console app and add a pause at the end:

MyProg.batMyProg.exePAUSE 


If you add a getch() or system("pause") or whatever at the end of your program, you will get that ''interruption'' of the program flow even if you use it within a standalone console (start command.com/cmd.exe then call your program from there) or if you use it within a shell script.

Keeping that interactive ''junk IO'' outside of your main program is a Good Thing in my book.

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” — Brian W. Kernighan
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement