Achei alguma coisa que pode te ajudar:
#include "iostream.h" #include "fstream.h" int main() { ofstream printer; printer.open("lpt1"); printer << "Testef"; return 0; }