Lab 0

Due Feb 10 by class time.

Using the CS server for programming


Convert a program from Data Structures to work on the CS server


Step 1

Use SSH to log into

Username: Your email username (before the @)

Password: Your MVNU ID

Once logged in, change your password with passwd

Step 2

Review the

Step 3

Copy and build:

// my first program in C++

#include <iostream>
using namespace std;

int main ()
  cout << "Hello World!";
  return 0;
Place code in hello.cpp
g++ -o hello hello.cpp

< sticky>Run with "./hello"</sticky>

How to put files on the server

Use secure copy (scp) or FTP from a MAC or Win computer.

Step 4

Port your own program

You goal is to select a program from Data Structures and get it to run on the our Linux Server. The program must be at least 100 lines of code.

If your program has multiple source files, copy them all, includeing the .h files, and then do the following:

Assume you have the following sources:

  • a.cpp
  • a.h
  • b.cpp
  • b.h
  • main.cpp

user% g++ -c a.cpp
user% g++ -c b.cpp
user% g++ -c main.cpp
user% g++ -o main a.o b.o main.o

Turn in

  1. Screen shoot(s) of your running program
  2. A brief writeup of your experience: What problems you encountered, what you learned.


Edit | Attach | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 2015-02-03 - JimSkon
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback