| | |
Print a file to Printer in DEV-C++
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2007
Posts: 31
Reputation:
Solved Threads: 0
I am trying to write a program to print a file to a printer.
havent gotten fery far till I started to go ary, here is the listing so far.
I'm thinking that the SCANF is not capturing the filename.ext thier for
ofcourse it will not print is the following statement.
any assistance would be greatly Appreciated.
Thank you
Dick
havent gotten fery far till I started to go ary, here is the listing so far.
c Syntax (Toggle Plain Text)
// This Program is to print a file listing with line numbers to Printer. #include <stdlib.h> #include <stdio.h> #include <conio.h> int line = 0, page = 0; int main( int argv, char *argc[] ) { char buffer[256]; FILE *fp; printf("Enter File Name.\n "); scanf("filename.ext" ); printf("%d",filename.ext "\n" ); system( "PAUSE" ); return 0; }
I'm thinking that the SCANF is not capturing the filename.ext thier for
ofcourse it will not print is the following statement.
any assistance would be greatly Appreciated.
Thank you
Dick
Last edited by WaltP; Apr 13th, 2007 at 1:21 am. Reason: Fixed CODE tags -- nice try but no cigar! See that PREVIEW button? It helps
When was the last time you looked at the format of a
scanf() command? And while you're at it, read this about scanf() The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
![]() |
Similar Threads
- Using VB Code - Silent download pdf from server and print to local printer (Visual Basic 4 / 5 / 6)
- How to print to file (Perl)
- File and Printer Shareing Problem (Networking Hardware Configuration)
- question about file and printer sharing (Web Browsers)
Other Threads in the C++ Forum
- Previous Thread: Pointers
- Next Thread: making a project file using classes
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count data database delete deploy developer dll download dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings struct temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






