Can U Help ME

hello i am in a bit of problem
Can i print what is displayed on the console(moniter)
I think it can be but how in c++ plz do answer me i use turbo c++ compiler v.3.0

Comments

  • You mean print on the printer? Try this, it might work:

    Instead of:
    printf ("%d
    ", an_int);
    Use:
    fprintf (stdprn, "%d
    ", an_int);

    In general, replace all "printf (x, y)" with "fprintf (stdprn, x, y)"

    stdprn = standard printer (printf prints to stdout which is the screen by default)

    There is also a way to redirect all of a program's output to the printer in DOS. Call the program in the DOS prompt like this:

    progname > prn (I'm not sure if it's prn, if it's not, try lpt1 if you have a parallel port printer)

    Tell me if this worked for you...

    : hello i am in a bit of problem
    : Can i print what is displayed on the console(moniter)
    : I think it can be but how in c++ plz do answer me i use turbo c++ compiler v.3.0
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion