Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Generated by Foxit PDF Creator Foxit Software http://www.foxitsoftware.com For evaluation only.

How to compile a c++ program on the Foothill online Solaris computers.


You will have to supply a ASCII text file as the source code to compile This can be done by a) using a text editor such as nano or vi or b) using sftp to copy an existing file onto the Solaris host (assume the file name to be foo.cpp). To compile the file foo.cpp type at the command prompt: $ c++ foo.txt <enter> If the code is without errors, the prompt will disappear for a brief instant indicating a program running in the foreground and then reappear without comments. What has happened is that the compiler compiled the source code into an executable named a.out into your current directory. To execute the code, type at the command prompt $ ./a.out <enter> (note thats a: dot, slash, the character a, dot, and the word out ). The program output will be displayed on the screen. The following screen capture shows the commands and outputs.

Tha tha thats all folks.

You might also like