mkdir classes
mkdir classes/cse332
| shell |
tcsh and csh | bash | sh and korn |
|---|---|---|---|
| Define env. variable | setenv CSE332 ~/classes/cse332 | export CSE332=~/classes/cse332 | export CSE332=~/classes/cse332 |
| Include in current shell | source script | source script or . script | . script |
| Login script | ~/.cshrc | ~/.bashrc | ~/.profile |
mkdir $CSE332/lab1
cd $CSE332/lab1
#include <iostream>
int
main (int argc, char **argv)
{
std::cout << "Hello World" << std::endl;
return 0;
}
g++ -Wall -o hello hello.ccThen execute the program you just created by typing its filename at the shell command line (notice that I generally include the absolute path to the executable):
./helloBe able to explain the purpose of each command line option used for g++ (use the man pages).