Printing source code from compiler

New to Mbed and to C, C++

The on-line compiler is great. But I haven’t found out how to print a copy of the source code file (.cpp).

Can copy the file, and was able to subsequently make a ,pdf of it on another Mac

But can not print a copy of the file, which has the extension .cpp

The pdf of that file, which I was able to make on one computer, is simply missing the line numbers, and so is of limited use to me.

Tried on a Mac that has Sublime Text 3.2, which opens the file nicely, but still don’t know how to get it to print a hard copy.

Thanks for any help you can provide.

            GBB

Hello George,

I don’t have a Mac computer but on Linux and Windows it works as follows ( on a Mac computer the procedure should be very similar):

  • Open the .cpp file you’d like to print.
  • Click on the Printer icon (top-right on the toolbar) Print
  • The browser displays a list of available printers (installed on the used system). If there is no printer installed on your system you should install at least one and connect it to your computer (you can install also a virtual printer and print to a file e.g. .pdf).
  • Select the printer you’d like to use and print as usual.

Best regards, Zoltan

Thanks!!!

The icon was grayed out, and I looked right past it. Once a printer was connected, works fine!