Menu

help with printf/scanf

2004-08-28
2012-09-26
  • Nobody/Anonymous

    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.)

     
    • Nobody/Anonymous

      Post your code (or a small program that illustrates this problem).

       
    • Anonymous

      Anonymous - 2004-08-28

      I apologize for THIS stupid question, but are you re-compiling the code after any changes before you are running it?

       
    • Nobody/Anonymous

      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!

       
      • Anonymous

        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.

         
    • aditsu

      aditsu - 2004-08-30

      my guess is that you were compiling it as a gui application (instead of console)

      Adrian

       
    • Wayne Keen

      Wayne Keen - 2004-08-30

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.