This section of the lab will review pertinant concepts from 150/215 about how to log into Sleipnir, manipulate files and send emails. I'll also show you how to secure your files so that other students cannot read them.
Refer to my connection guide for more details on how to connect to Sleipnir and log in.
To copy hello.cpp to your Sleipnir account, use pico
to create
a file called hello.cpp
(vi
requires special
commands for cut-and-paste operations. I will show you how to do that in a
later lab). Highlight all of the Hello world program in Firefox, then switch
over to the terminal and click the scroll wheel (just click, don't scroll)
to paste onto Sleipnir. Save and exit pico
by pressing CTRL+X
and following the prompts.
To compile the hello.cpp
source code file, issue the following
command on Sleipnir:
g++ -o lab1 hello.cppThis will create an executable called
lab1
. If you pasted the
code correctly, there should be no syntax errors. To run the executable,
give the following command:
./lab1