Need Help With Printing Complete Beginner Need Help!!!

Need Help With Printing Complete Beginner Need Help!!!

Post by Resistenc » Wed, 24 May 2000 04:00:00



My teacher makes us use prn statements after every single cout so we can
show our work.  Anyway, I just got C++ at home and I can't get the prn's to
work.
Here's my simple program
#include <fstream.h>
#include <iostream.h>
#define PRINT_IT ofstream prn("PRN")
PRINT_IT;
main()
{
    cout << "Blah";
    prn << "Blah";
    return 0;

Quote:}

Blah comes up on the screen and nothing goes out the printer.  Any ideas
would help greatly.  I have an HP 722C printer if that is of any help on
LPT1.  That is how it is set up at school exactly and it won't work at home.
 
 
 

Need Help With Printing Complete Beginner Need Help!!!

Post by John Harriso » Thu, 25 May 2000 04:00:00



Quote:> My teacher makes us use prn statements after every single cout so we can
> show our work.  Anyway, I just got C++ at home and I can't get the prn's
to
> work.
> Here's my simple program
> #include <fstream.h>
> #include <iostream.h>
> #define PRINT_IT ofstream prn("PRN")
> PRINT_IT;
> main()
> {
>     cout << "Blah";
>     prn << "Blah";
>     return 0;
> }

> Blah comes up on the screen and nothing goes out the printer.  Any ideas
> would help greatly.  I have an HP 722C printer if that is of any help on
> LPT1.  That is how it is set up at school exactly and it won't work at

home.

It doesn't work at home because the above code is non-standard and therefore
not guaranteed to work in all environments.

C++ has no standard method for doing printing. You have to work out what the
correct technique for printing is on your computer, with your compiler and
your operating system. Try consulting your compilers documentation or ask
your teacher. You may well be able to get the something like the above to
work, its just the PRINT_IT part that needs to be different.

john

- Show quoted text -


 
 
 

1. Help! Beginner need help for Borland Database Tools

Hello All,

I have a Problem this the Borland Database Tools.
I want create a Programm this datas in DBASE Format.
It seems so, that all changes in my Records, are only make
in the Memory, not on my Harddisk! I can't find what it is.
When I open the Table after it's close, I have the same
datas, I have input. But my table on the Harddisk have no changes!
I work this BC4.52 and Windows 95.
Can anybody help me?

Greatings to you Jens!

2. enable pcmcia.sys recognizing a PCMCIA Card

3. Help needed in Scottsdale - Mac help needed using C++

4. Mac silliness derided (offensive to some)

5. Need help printing saved Print files or spooled files.

6. O2's and 3d texture mapping?

7. Complete Noob Needs Help

8. Some help needed to complete my assg

9. Swedish game developer list - need help making it complete

10. Where can a complete beginner get UML help

11. I am a beginner needs some help

12. beginner needing help!