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. Is there a way to view console output in the VS ide after console program ends?

Is there a way to view console output in the VS ide after console program ends?

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiolearningc++comtesting
3 Posts 3 Posters 1 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.
  • W Offline
    W Offline
    wsirota
    wrote on last edited by
    #1

    Hi, I'm working in VS2005, C++. I'm pretty much a C++ newbie. I tend to write a lot of little console programs while i'm learning and testing things out. But of course the console disappears once the program is finished. it would be handy to be able to see the console output after the fact in the ide, and it seems to me there must be a way to do that - i just don't know it yet. any ideas? Thanks, Warre

    Warren Sirota www.warrensirota.com

    N 1 Reply Last reply
    0
    • W wsirota

      Hi, I'm working in VS2005, C++. I'm pretty much a C++ newbie. I tend to write a lot of little console programs while i'm learning and testing things out. But of course the console disappears once the program is finished. it would be handy to be able to see the console output after the fact in the ide, and it seems to me there must be a way to do that - i just don't know it yet. any ideas? Thanks, Warre

      Warren Sirota www.warrensirota.com

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      Try any of the following suggestions 1. Put a getch() at the end of the program so that console application will wait for a key press before it exists. 2. Redirect the output to a text file. For eg in the project settings->debug->Program arguments, if you enter c:\output.txt, all the outputs from the program will go to the text file.

      nave [OpenedFileFinder] [My Blog]

      J 1 Reply Last reply
      0
      • N Naveen

        Try any of the following suggestions 1. Put a getch() at the end of the program so that console application will wait for a key press before it exists. 2. Redirect the output to a text file. For eg in the project settings->debug->Program arguments, if you enter c:\output.txt, all the outputs from the program will go to the text file.

        nave [OpenedFileFinder] [My Blog]

        J Offline
        J Offline
        James R Twine
        wrote on last edited by
        #3

        3: Get a Windows version of the "tee" utility so that the OP can get it both in a file and in the output. Helps with interactive apps or while debugging.    Peace!

        -=- James
        Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
        Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
        See DeleteFXPFiles

        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