you should read the Read Me threads at the top of this board. They contain all (or probably most) of the information you are looking for.
If you want to print simple text files you can treat the printer as any other ordinary text file. The file name of the printer will probably be "LPT1:", prividing the printer is connected directly to your computer.
Writing to a file is almost identical to writing to the screen. Only addition is that in C you will need a FILE pointer. Search these threads for FILE and you will find hundreds of examples. For c++ use fstream class.