# ... is a comment, don't type it in.
-> denotes the command interpreter (shell) prompt,
your prompt will be different.
The -> was chosen to save space.
Type the following URL in the browser's location text area.
Replace YOUR_USERNAME in the URL with your loki username.
classes.cs.kent.edu/svn/cs23021/001/YOUR_USERNAME/cs23021
You will be asked for a username and password.
No files or directories will be present in the page that comes up.
Enter the following commands:
-> ls # List your files -> ll # List your files, with more information -> pwd # Print working directory, the directory you're currently in
YOUR_USERNAME with your loki username in the
following command.
-> svn co http://classes.cs.kent.edu/svn/cs23021/001/YOUR_USERNAME/cs23021
cs23021 directory is now present,
this is the working copy.
-> ll # List your files
-> cd cs23021 # Change directory -> pwd # Print working directory
-> mkdir Hello # Unix mkdir command -> svn add Hello # svn command
Or instead do it all at once (don't do this if you've done the previous two).
-> svn mkdir Hello # svn mkdir command, creates and adds to versioning
-> svn commit -m "created directory for hello world program"
Verify the directory has been created using the browser.
-> cd Hello # Change directory -> pwd # Print working directory
Start vi or emacs using hello.cpp
-> emacs hello.cpp # Use one of the other -> vi hello.cpp # Use one of the other
Type in the following header comment. Replace YOUR NAME with your name.
/*Greet the world. * *Author: YOUR NAME */
Make sure you do a write/save.
-> svn add hello.cpp # Adding a file is only done once
-> svn commit -m "added header comment"
Every complete C++ program must have a function named
main so if you compile the file at this
point there will be error messages about the lack of the
main function.
-> g++ hello.cpp # Compile
int main()
{
}
-> svn commit -m "added main function to hello.cpp"
-> g++ hello.cpp
main.
Replace YOUR NAME with your name.
// Output greeting.
std::cout << "Hello World!\n";
std::cout << "My name is YOUR NAME!\n";
return 0;
-> svn commit -m "added output in main"
-> g++ hello.cpp -> ./a.out # Run your program
It is important to master the skills used above.
If you have any trouble with any of the above ask your instructor.
Upon completion of this assignment it will be assumed you are comfortable with the skills used in the steps above.