Con le streams:
Non funziona con stampanti USB. Il vantaggio è che oltre a PRN puoi aprire anche LPT1, LPT2 e simili.codice:#include <fstream.h> int main() { ofstream printer; //Normale stream di out su file printer.open("PRN"); //Apre l'out sulla stampante di default printer << "CIAO" << " TVTTB"; /*Stampa stringhe sullo stream; puoi usarlo come cout*/ }
Ciao.