printing on network printer

This is a discussion on printing on network printer within the C++ Programming forums, part of the General Programming Boards category; hi, i'm real c++ amateur and i need some help. I created simple program in C++ and i want to ...

  1. #1
    Unregistered
    Guest

    printing on network printer

    hi, i'm real c++ amateur and i need some help. I created simple program in C++ and i want to print resoults on network printer. I have no idea how to do that and i please someone to write c++ code that will start from dos command line and be able to print few double variables and few constants on network printer. i appreciate any help. Thanks

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    Fastest and easiest way is this:

    Code:
    
    ofstream printFile("output.txt");
    printFile << "Test of printer" <<endl;
    printFile.close();
    
    system("notepad.exe /p output.txt");
    Not the most elegant way, but it's by far the easiest.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 05-13-2009, 01:57 PM
  2. C# Printing Problem
    By silverlight001 in forum C# Programming
    Replies: 0
    Last Post: 03-23-2009, 02:13 AM
  3. Printing with printer
    By g4j31a5 in forum C++ Programming
    Replies: 5
    Last Post: 09-14-2006, 02:06 PM
  4. Printing Debug Without Printer :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 10-15-2002, 03:18 PM
  5. Printing to a printer....I already did a search :)
    By fastmonkey in forum C++ Programming
    Replies: 1
    Last Post: 10-09-2002, 02:51 AM

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