Can I use DevC++ to print a file/data?

is there a code in C++ to instruct a program to print a particular file? how? I know how to save data via .txt or via .doc but i don't know how to print it while i'm in the program.
If you are using an fstream, just open it normally then use getline while file.good(), and store the resulting stuff into a array/vector or just print it out as you go.
This is my sample (draft design):
choose 1

1. print a (file, ex: payroll record)
2. open a (file, ex: payroll record)
3. view a (file, ex: payroll record)
4. edit a (file, ex: payroll record)

I chose: _


so my question is how to print the file while i'm in the program? honestly speaking, i don't have any idea whatsoever, i'm REALLY a newbie.
Last edited on
I think Firedraco wanted to say this

String line;
While (!file.eof()){
cout <<line;}

hope this helps.
Last edited on
Do you mean display the text on the screen or actually print out a sheet of paper from the printer?
I don't know how to print from the printer but someone else may.
Last edited on
Topic archived. No new replies allowed.