create a c++ program: unix
 
home | 163 | 202 | 244 | 253 | 355   .   courses | advisees | faq | honesty | schedule   .   webHelp | unixHelp | c*Help | asmHelp

   
 0. Translate algorithm into C++ 
  1. Open puTTY in Windows
    - Click on the desktop icon  
    OR  
    - Click the start menu and find program
  2. Enter hostname:
       jupiter.clarion.edu

  3. Login with your Clarion University username and password
       s_imstudent 
       ss#(9) plus birthdate(4)

  4. Goto the class folder
       cd courses/class_cis16301
    (or whatever your class folder is)
       ls -la
    lists your files

  5. Start the 'pico' editor
       pico helloWorld.cpp
  6. unix
    Enter Code (or modify existing code)
          // Hello World Program
          #include <iostream>
          using namespace std;   
          int main()
          {
            cout << "Hello World!" << endl;
            return 0;
          } 

  7. Exit the pico editor
       ctrl-x
    - Save modified buffer?
       y = Yes

    - File Name to write:
       hello.cpp [enter]

  8. Compile code (note: CAPITAL CC)
       CC hello.cpp 
    unix - No message means NO syntax errors - Good! - a file called 'a.out' was created...
    - If you DO have syntax errors, they will be listed by line number and you must start pico again and fix the errors (goto step 5)
  9. Finaly, on a 'clean compile', execute your progra by typing:
        a.out

  10. Don't forget to logout!!
       logout


[optional: To create an executable with a unique name,

      CC hello.cpp -o hello
compiles and creates an executable called "hello" that can be executed by typing:
      hello

freedom through discipline