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.
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.