Trying to use c++ to print to a usb printer

Does anyone know how to print a c++ file linked to a USB printer directly?
Topic archived. No new replies allowed.