- Translate algorithm into C++
- Open puTTY in Windows
- Click on the desktop icon
OR
- Click the start menu and find program
- Enter hostname:
cisprod.clarion.edu
- Login with your Clarion University username and password
s_imstudent ss#(9) plus birthdate(4)
- Goto the class folder
cd courses/244 folder name
(or whatever your class folder is)
ls -la
lists your files
- Start the 'pico' editor
pico helloWorld.cpp
Enter Code (or modify existing code)
// Hello World Program
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
- Exit the pico editor
ctrl-x
- Save modified buffer? y = Yes
- File Name to write: hello.cpp [enter]
- Compile code
g++ -o hello hello.cpp
- 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 6)
- Finaly, on a 'clean compile', execute your progra by typing:
a.out
- Don't forget to logout!!
logout