Running SOS in C++ on a Mac


Download the sosformac.o which is in C++.

     To create an executable program and generate output:

1. Copy sosformac.o to your current directory and rename it sos.o.

2. Write your project and save it in a file called os.cpp.

3. Make sure that sos.o and os.cpp (or copies) are in the same (main) directory of the disk.

4. Make the directory containing both sos.o and os.cpp your current directory.

5. To compile the program, type the following:

    g++  os.cpp sos.o

If compilation is successful, an executable file will be created, called a.out.. You can rename the file as sos if you wish.

6. Click on a.out to run it (or click on sos to run it if you renamed it.

7. Print the Terminal window that opens by clicking "Shell > Print" or typing "Command - P".