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. How to get output of console program?

How to get output of console program?

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
3 Posts 3 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.
  • K Offline
    K Offline
    Kuniva
    wrote on last edited by
    #1

    This may seem like a stupid question, but i simply don't know where to look. How can I execute a console program from another console program and catch the output so i can display it in my own program. Thing is I want to have a file compiled but i want to catch the output from the compiler binary in case of errors. The only functions I know to execute something are system() and ShellExecute() but I don't know how to catch the output after that. Kuniva --------------------------------------------

    R D 2 Replies Last reply
    0
    • K Kuniva

      This may seem like a stupid question, but i simply don't know where to look. How can I execute a console program from another console program and catch the output so i can display it in my own program. Thing is I want to have a file compiled but i want to catch the output from the compiler binary in case of errors. The only functions I know to execute something are system() and ShellExecute() but I don't know how to catch the output after that. Kuniva --------------------------------------------

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      This[^] article may help. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

      1 Reply Last reply
      0
      • K Kuniva

        This may seem like a stupid question, but i simply don't know where to look. How can I execute a console program from another console program and catch the output so i can display it in my own program. Thing is I want to have a file compiled but i want to catch the output from the compiler binary in case of errors. The only functions I know to execute something are system() and ShellExecute() but I don't know how to catch the output after that. Kuniva --------------------------------------------

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

        Kuniva wrote: How can I execute a console program from another console program and catch the output so i can display it in my own program. You can read here and here.


        "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