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. help with system("PAUSE")

help with system("PAUSE")

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
6 Posts 4 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
    Jared F
    wrote on last edited by
    #1

    I need to know how to pause a program for a specific amount of time and then show the "Press any key to continue..." line that is shown by system("PAUSE"). i've seen people do this before, but i've never asked them how to. dudeoffrance

    B D 2 Replies Last reply
    0
    • J Jared F

      I need to know how to pause a program for a specific amount of time and then show the "Press any key to continue..." line that is shown by system("PAUSE"). i've seen people do this before, but i've never asked them how to. dudeoffrance

      B Offline
      B Offline
      Budric B
      wrote on last edited by
      #2

      I'm assuming you're writing a console application? This code works for me #include "stdafx.h" #include "Windows.h" #include "conio.h" int main(int argc, char* argv[]) { Sleep(5000); //wait 5 seconds printf("Wait..."); getch(); //get any key from the user printf("\nHello World!\n"); return 0; }

      1 Reply Last reply
      0
      • J Jared F

        I need to know how to pause a program for a specific amount of time and then show the "Press any key to continue..." line that is shown by system("PAUSE"). i've seen people do this before, but i've never asked them how to. dudeoffrance

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

        Is this a console or UI application?


        "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

        T J 2 Replies Last reply
        0
        • D David Crow

          Is this a console or UI application?


          "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          DavidCrow wrote: Is this a console or UI application? look like to be CONSOLE application!

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta

          1 Reply Last reply
          0
          • D David Crow

            Is this a console or UI application?


            "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

            J Offline
            J Offline
            Jared F
            wrote on last edited by
            #5

            its a console application. dudeoffrance

            D 1 Reply Last reply
            0
            • J Jared F

              its a console application. dudeoffrance

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

              Ok, Budric's response was more or less correct. It's been six days. Has this been resolved?


              "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

              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