Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Stop the screen from dissapear

Stop the screen from dissapear

Scheduled Pinned Locked Moved C / C++ / MFC
questionlearning
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    justcallmedin
    wrote on last edited by
    #1

    Hi, I am a total beginner. How do I stop from the black screen which displays the result of execution to automatically dissapear?. It came out in a blink of an eye and then of it goes. I just want to print out a simple "Hello World" message. Thanks.

    G A C D 4 Replies Last reply
    0
    • J justcallmedin

      Hi, I am a total beginner. How do I stop from the black screen which displays the result of execution to automatically dissapear?. It came out in a blink of an eye and then of it goes. I just want to print out a simple "Hello World" message. Thanks.

      G Offline
      G Offline
      Ganesh_T
      wrote on last edited by
      #2

      Hi I have understood your problem. If your are creating the console application you would be pressing the F5 button. In this case the windows diaplays the result for your execution but just dissappears. For this you have to press CTL+F5. Cheers "Peace of mind through Technology"

      J 1 Reply Last reply
      0
      • G Ganesh_T

        Hi I have understood your problem. If your are creating the console application you would be pressing the F5 button. In this case the windows diaplays the result for your execution but just dissappears. For this you have to press CTL+F5. Cheers "Peace of mind through Technology"

        J Offline
        J Offline
        justcallmedin
        wrote on last edited by
        #3

        I'm using Dev C++. The command to run is F9

        1 Reply Last reply
        0
        • J justcallmedin

          Hi, I am a total beginner. How do I stop from the black screen which displays the result of execution to automatically dissapear?. It came out in a blink of an eye and then of it goes. I just want to print out a simple "Hello World" message. Thanks.

          A Offline
          A Offline
          Arvind Bharti
          wrote on last edited by
          #4

          In case if you don't have any issue in using C functions in C++, then include conio.h and add the following code at the end of function. cout << "Press any key to exit."; getch();

          1 Reply Last reply
          0
          • J justcallmedin

            Hi, I am a total beginner. How do I stop from the black screen which displays the result of execution to automatically dissapear?. It came out in a blink of an eye and then of it goes. I just want to print out a simple "Hello World" message. Thanks.

            C Offline
            C Offline
            Cedric Moonen
            wrote on last edited by
            #5

            Another solution is to call system("PAUSE");

            1 Reply Last reply
            0
            • J justcallmedin

              Hi, I am a total beginner. How do I stop from the black screen which displays the result of execution to automatically dissapear?. It came out in a blink of an eye and then of it goes. I just want to print out a simple "Hello World" message. Thanks.

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              Open a command prompt and run your program from there rather than from within the IDE. That is why the window is quickly disapearing.


              "Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

              "There is no death, only a change of worlds." - Native American Proverb

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups