I am trying to print to my printer which is on LPT1 from a C program

Am using dev c++ which came with Teach Yourself C in 21 Days

here is the code that is supost to print th my printer which is a HP
Photosmart 7350.

/* Demonstrates printer output. */
/* stdprn is not ansi standard */
#include <stdio.h>
 
int main( void )
{
float f = 2.0134;
 
fprintf(stdprt, "\nThis message is printed.\r\n");
fprintf(stdprt, "And now some numbers:\r\n");
fprintf(stdprt, "The square of %f.",f, f*f);
 
/* Send a form feed. "\f");
fprintf(stdprt, "\f");
 
return 0;
}

but when I try to compile this code the compiler returns errors when
it gets to fprintf(stdprn I have tryed substituting stdout for stdprn
however that doesn't help. Any assestance would be Greatly Appreciated.

Dick:rolleyes:

Thank you Will give it a try.

Dick

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.