delorie.com/archives/browse.cgi | search |
Message-ID: | <007001bdf924$15a64900$4aed8081@bhodge> |
From: | "Blaine Hodge" <bhodge AT gpu DOT srv DOT ualberta DOT ca> |
To: | <djgpp AT delorie DOT com> |
Subject: | Re: Is there a standard easy way to print to a printer? |
Date: | Fri, 16 Oct 1998 10:43:19 -0600 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook Express 4.72.3110.5 |
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3 |
Reply-To: | djgpp AT delorie DOT com |
>Open a stream/file with the name of PRN which is the DOS filename for the >printer. >eg in C++ > fstream printer( "PRN" ); >in C > FILE* printer=fopen( "PRN" "wb" ); >(I think this is write I haven't written in C for ages. ) ofstream printer( "PRN" ); FILE* printer=fopen( "PRN", "w" ); "wb" would be write binary and would screw up the newline/carriage return thing. "w" is text format and outputs newline & CR on a '\n' character. But you were right. - Blaine
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |