Printing your HW source code hw.cpp

Suppose you wrote your source code hw.cpp using your VM. Now, it's time to print it. Unfortunately, however, you cannot directly print it in VM.

In order to print your source code, you should convert hw.cpp to a pdf file, then move the pdf file to your Windows.

Detailed instructions

  1. Create out.pdf for hw.cpp
    1. Use a terminal. cd to the directory that contains your cpp file.
    2. In the terminal, use codeprint to create out.pdf
      codeprint hw.cpp 
    3. In the terminal, use ls to see if out.pdf exists.
      ls 
      Note out.pdf must exist.
    4. Launch a file viewer as below (Applications -- Accessories -- Files)

      With the file viewer, navigate to the directory and double-click out.pdf to see if it is correctly created.

  2. Move out.pdf to your Windows.