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. Console Applications

Console Applications

Scheduled Pinned Locked Moved C / C++ / MFC
c++csharpquestion
4 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.
  • C Offline
    C Offline
    Cpudood
    wrote on last edited by
    #1

    When working with console applications from within Visual C++.NET, How would I get the console window to stay open after the program has executed so that I may view the results of the code? Do you change these properties within Visual C++ or Windows?

    A D 2 Replies Last reply
    0
    • C Cpudood

      When working with console applications from within Visual C++.NET, How would I get the console window to stay open after the program has executed so that I may view the results of the code? Do you change these properties within Visual C++ or Windows?

      A Offline
      A Offline
      Anders Molin
      wrote on last edited by
      #2

      You can start the program with either Run or Debug. One of them leaves the program open with a "press any key to continue" message. I don't remember which one though. :-O - Anders Money talks, but all mine ever says is "Goodbye!"

      1 Reply Last reply
      0
      • C Cpudood

        When working with console applications from within Visual C++.NET, How would I get the console window to stay open after the program has executed so that I may view the results of the code? Do you change these properties within Visual C++ or Windows?

        D Offline
        D Offline
        Daniel Turini
        wrote on last edited by
        #3

        put a breakpoint on the last "}" on your main function. lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik

        C 1 Reply Last reply
        0
        • D Daniel Turini

          put a breakpoint on the last "}" on your main function. lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik

          C Offline
          C Offline
          carrie
          wrote on last edited by
          #4

          or do put a getch() at the end before it returns a value or before the last line. void main(void) { // blah blah do everything here. getch(); // will wait for a keypress until it does anything else }

          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