You could try approaching the problem from a different angle
Now the print command can be used to print a text file. Rather than changing your program, I would suggest some experiments with the print command to see if you can actually print anything.Code:D:\code>print /? Prints a text file. PRINT [/D:device] [[drive:][path]filename[...]] /D:device Specifies a print device.
Something else to look at
> if((printer = fopen("LPT1","w")) == NULL)
Do you have a file called "LPT1" in your directory?