printing output

This is a discussion on printing output within the C Programming forums, part of the General Programming Boards category; how to print the output of my C++ program(visual studio 2005) to paper?the code i printed just by print option,but ...

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    5

    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...
    thanx!

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    or just run command as
    "dir > output.txt"

    and then print the generatd file
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

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, 10: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, 10:29 AM
  5. printing output from prog
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 08:50 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21