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)
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.