Purpose:
The purpose of this homework assignment is to familiarize yourself using the
Vi text editor, compiling C++ source code with g++, and to run the executable
within the Unix environment.
In this homework, you will be writting your first C++ program. You will copy the provided code, compile the code, and run your first C++ program.
// Homework 1 - Hello World
// First Name Last Name Date
// Class Section
#include<iostream>
using namespace std;
int main() {
cout << "Hello World";
cout << endl;
return(0);
}
During lecture, we will discuss what each line statement is used for in the provided code. You may not know much about what is going on yet, but by next week you will. This assignment is more so a 'copy/paste' and follow the instructions kind of deal, but again, the purpose is to familiarize yourself with Unix and standard compilation. We will learn the details very soon.
vi hw1.cpp
g++ hw1.cpp
g++ hw1.cpp -o helloWorld
./a.out
or for a named exec
./helloWorld
cout << "First Last";
cout << endl;
Once completed, you will compose an email and attach your
source code only (hw1.cpp). For the subject of the email,
write the hw/lab # and cs2010-01 (morning) or cs2010-03 (afternoon). For
example:
To :derrick@cs.csubak.edu
Cc :
Attchmnt:hw1.cpp
Subject :hw1 cs2010-1
----- Message Text -----
Here's my homework 1 submission
That's it, congratulations, and you're done. If you have any questions, feel free to ask me during office hours, before class, after class, email me, call me, or find me and I'd be happy to help. Also, there's the walk-in lab (SCI III rm 324) where there are tutors there to help if you cannot reach me