This line of code here: ofstream scrn, prnt;
create two objects of type ofsteram. One of these objects is called scrn, and the other one is called prnt. Thus, scrn is an object of type ofstream.
Time to learn what a variable is: http://cplusplus.com/doc/tutorial/variables/
scrn.open("CON", ios::out);
This line says "take that object I made called scrn, and use one of its function. Use the function it has which is called open. This function it has, called open, takes two parameters. Make the first parameter "CON" and the second parameter ios::out."
1.ofstream is used to write to files.
2.ifstream is used to read from files.
3.fstream is used to both read from and write to files.
scrn and prnt are objects of type ofstream.
It means scrn and prnt can be used as pointers to files.
scrn.open ("CON", ios::out)
scrn is used to open the file named "CON" in output mode (ios::out) and prnt.open ("LPT1", ios::out)
prnt is used to open the file named "LPT1" in output mode.
I assume that the object named scrn is used to save data to be written to the console
and object prnt is used to save data to be printed.
The code is using ofstream to write to the console (CON) -- or screen -- and to a printer (LPT1 = Line Printer Terminal 1). Assuming there is a printer attached to the parallel port.
That is, CON and LPT1 represent the actual devices. Not files on disk for writing to the devices later.