All of my programs are compiling correctly, but when I run them they do not print the output in the window that opens, and they do not pause to accept input for scanf. The only thing that ever shows in the window is "press any key to continue..." when I emulate an MS-DOS system pause. Any ideas? (I apologize if this is a stupid question.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
yes, I was recompiling it after I changed it, but i just pasted the changed code into a new file and it is working now. I'm not sure what the difference is, but i am grateful that it is working now. Thanks for all your help!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-08-29
My guess is that the file you had open in the editor was not the same file as that in the project.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is a good example of how posting your full compile log is a always good idea, *even* if the error is something that manifests at run time, not compile time.
Why?
Because the compile log would show us whether you have accidentally compiled a console program as a windows program. Its a mistake I make from time to time, usually as a result of not following Cliffords advice about always using projects.
The compile log is on the tab labeled "Compile Log", and the copy meny to copy it is brought up with the right mouse button.
Posting the log is part of what I call the basic 3 you should always post. Posting the following is always, and I do mean always better than posting a general description of what is happening by itself
(1) What version of Dev are you using, with what OS. (Note "Newest" is not a version)
(2) Post a simple as possible example program that shows the effect. (Don't ask people to debug a long program in place and don't just excerpt a few lines)
(3) Post your full compile log. If you have a ton of errors, post from the beginning through the first 5 or so errors. Always include from the beginning, as seeing how the compiler is invoked is *very* important.
Wayne
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All of my programs are compiling correctly, but when I run them they do not print the output in the window that opens, and they do not pause to accept input for scanf. The only thing that ever shows in the window is "press any key to continue..." when I emulate an MS-DOS system pause. Any ideas? (I apologize if this is a stupid question.)
Post your code (or a small program that illustrates this problem).
I apologize for THIS stupid question, but are you re-compiling the code after any changes before you are running it?
yes, I was recompiling it after I changed it, but i just pasted the changed code into a new file and it is working now. I'm not sure what the difference is, but i am grateful that it is working now. Thanks for all your help!
My guess is that the file you had open in the editor was not the same file as that in the project.
my guess is that you were compiling it as a gui application (instead of console)
Adrian
This is a good example of how posting your full compile log is a always good idea, *even* if the error is something that manifests at run time, not compile time.
Why?
Because the compile log would show us whether you have accidentally compiled a console program as a windows program. Its a mistake I make from time to time, usually as a result of not following Cliffords advice about always using projects.
The compile log is on the tab labeled "Compile Log", and the copy meny to copy it is brought up with the right mouse button.
Posting the log is part of what I call the basic 3 you should always post. Posting the following is always, and I do mean always better than posting a general description of what is happening by itself
(1) What version of Dev are you using, with what OS. (Note "Newest" is not a version)
(2) Post a simple as possible example program that shows the effect. (Don't ask people to debug a long program in place and don't just excerpt a few lines)
(3) Post your full compile log. If you have a ton of errors, post from the beginning through the first 5 or so errors. Always include from the beginning, as seeing how the compiler is invoked is *very* important.
Wayne
Wayne