printing txt files

This is a discussion on printing txt files within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Iv looked everywhere and I cant find any txts on how to print documents using c++. I use borland but ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    1

    Question printing txt files

    Iv looked everywhere and I cant find any txts on how to print documents using c++. I use borland but the help files are useless

    can anyone help me??

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    140
    Well, if your printer is all ready to go and happy you could probably do something like this:

    Code:
    sprintf(stdprn, "%s", string);

  3. #3
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Or, in C++:

    ofstream fout("LPT1");//LPT1 is the normal printer port
    cin>>infotobeprinted;
    fout<<infotobeprinted;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. comparing 2 txt files
    By norhos in forum C Programming
    Replies: 9
    Last Post: 03-13-2008, 07:18 AM
  2. Help with loading files into rich text box
    By blueparukia in forum C# Programming
    Replies: 3
    Last Post: 10-19-2007, 01:59 AM
  3. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 02:30 PM
  4. Communication with txt files (continuing)
    By Gordon in forum Windows Programming
    Replies: 9
    Last Post: 08-13-2007, 09:49 PM
  5. Help on printing files
    By Unregistered in forum C++ Programming
    Replies: 5
    Last Post: 04-20-2002, 09:59 PM

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