Menu

show console screen?

2007-08-03
2012-09-26
  • Nobody/Anonymous

    I was wondering...in C++, with my editor, the screen will stay if I add

    system("PAUSE");

    Otherwise, the console would just flash on the screen.

    What is the code for C? I can't seem to find it anywhere. In my book, no one even mentions it.

     
    • Wayne Keen

      Wayne Keen - 2007-08-03

      "What is the code for C?"

      Same as for C++ (assuming you want to continue to use PAUSE) - just make sure that you

      include<stdlib.h>

      to provide access to the "system" function.

      Wayne

       
    • Nobody/Anonymous

      cool, ya, i didn't know that I needed that to use the System function in C
      thanx

       
    • Nobody/Anonymous

      you can shrink your program: replace system("pause") by while(1) and skip the inclusion ;

       
      • Anonymous

        Anonymous - 2007-08-03

        ... and what your process consume 100% of your CPU! ;-)

         
        • Anonymous

          Anonymous - 2007-08-03

          duh... watch

           

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.