hi
i am trying the following code to print the message. it is working well in a system having a printer connected through com1.
But is not working in other system that using usb port.
what should i do.


ofstream outfile;
outfile.opne("PRN");
outfile<<"\nThis is test printing";
outfile<<'\x0C';

I don't think you need to change anything in the code. Or in other words, I don't think you can change your code and make it work. It should be a matter of configuration of the printer. (which I have no clue).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.