I tried this, and it didn't work. I also tried the C version, and I also tried "LPT1" instead of "PRN". But I cannot get anything to print! Maybe my drivers don't like console apps. Anyway, I'm in Windows98 with a BJC-3000 printer connected via LPT port. Here's the code:
Code:int main(int argc, char* argv[])
{
ofstream prnt("PRN");
prnt << "\r HELLO FRIEND!" << '\f';
prnt.close();
return 0;
}