In most cases, search for print information on standard output, and results related to actual printers are mainly related to the Win32 API.
Is there such a thing as a basic non-OS API that allows a simple C ++ program to print a file, such as .txt, or print its standard output?
No, there is no API other than OS with C ++.
I would suggest running a command (for example, with library calls systemor popen) that print, and make this command user-configurable.
system
popen
CIM ( C) (, Qt, Gtk, GtkMM) API .