Thread: printing output

  1. #1
    Registered User
    Join Date
    May 2007

    printing output

    how to print the output of my C++ program(visual studio 2005) to paper?the code i printed just by print option,but the black "dos" window with the output i've never printed before...
    help plz...

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    You have a few options. One thing you could do is copy and paste from the command window into notepad or something similar and then print it out (Right click, click mark, shade in what you want, right click, open notepad, paste). Another is that you could run your program with output redirection to a file and then print it from there.

    More complicated would be to actually store your output and print it yourself from your program. Also slightly complicated would be to have a wrapper function which prints to both stdout and to a file, but that seems like overkill for something like this.

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    or just run command as
    "dir > output.txt"

    and then print the generatd file
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Having trouble making a function do what I want.
    By Shamino in forum C++ Programming
    Replies: 9
    Last Post: 12-07-2007, 11:20 AM
  2. Output an array in a textbox
    By Diablo02 in forum C# Programming
    Replies: 5
    Last Post: 10-18-2007, 03:56 AM
  3. Printing to file / Output issues
    By Roflcopter in forum C++ Programming
    Replies: 19
    Last Post: 10-11-2007, 07:38 PM
  4. sorting output on student info program
    By indigo0086 in forum C++ Programming
    Replies: 2
    Last Post: 11-05-2002, 11:29 AM
  5. printing output from prog
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 08:50 PM