To compile c++ code save file with extension .mm cd ~/Desktop g++ -Wall fileName.mm -o fileName This version is different that the c code version posted but you can use either version. The only difference is c++ has the extension .mm and then you use g++ while c has the extension .c and you use gcc NOT g++. JB