Your includes seem to suggest you're talking about DOS-style printing, in which case I *think* you should simply be able to do something like this:
Code:
std::ofstream printer("LPT1", std::ios::binary);
Btw, although writing "int main(void)" isn't wrong as such, it is generally considered bad style. Just stick to "int main()", IMO.