C++

Welcome to C++, Spring Term, 2017

Contents

Course Syllabus

C++ Course Syllabus, Spring 2017

Debugging with GDB and vim

Tips for debugging with gdb and vim

Course Projects

C++ Project 1

C++ Project 2

C++ In-Class Project, Jan 31

C++ Project 3

C++ Project 4

C++ In-Class Project, Apr 20

C++ Final Programming Project

Exam Extra Credit Programs

Exam 1 Extra Credit Programs

Exam 2 Extra Credit Programs

Course Slide Decks

File:C++-s17-chap1.pdf

File:C++-s17-chap2.pdf

File:C++-s17-chap3.pdf

File:C++-s17-chap4.pdf

File:C++-s17-chap5.pdf

File:C++-s17-chap6.pdf

File:C++-s17-chap7.pdf

File:C++-s17-chap8.pdf

File:C++-s17-chap9.pdf

Chapter 10 slides

File:C++-s17-chap11.pdf

Chapter 12 slides

File:C++-s17-chap13.pdf

Tools for the course

Tools for Windows users

Windows users should download and install:

Tools for CromeOS users

ChromeOS users should leverage the built-in crosh utility, accessible through the Ctrl + Alt + T keystroke sequence.

ssh syntax

To access storm using ssh (OSX terminal, ChromeOS crosh, or Linux shell), issue:

ssh username@storm.cs.uni.edu

where 'username' corresponds to your login id on storm (and should correspond to the primary portion before the '@' in your UNI e-mail address).

scp syntax

To copy files from your local laptop/workstation to storm.cs.uni.edu within a terminal (OSX terminal, ChromeOS crosh, or Linux shell), issue:

 scp mylocalfile username@storm.cs.uni.edu:.

where 'username' corresponds to your login id on storm (and should correspond to the primary portion before the '@' in your UNI e-mail address).


To copy files from storm.cs.uni.edu to your local laptop/workstation within a terminal (OSX termina, ChromeOS crosh, or Linux shell), issue:

 scp username@storm.cs.uni.edu:remotefile .

where 'username' corresponds to your login id on storm (and should correspond to the primary portion before the '@' in your UNI e-mail address).

vim shortcuts

  • F9: Compiles the code in your session (your filename must have a '.cpp' extension)
  • F8: Runs the code (assuming that it compiled!)
  • F7: When compilation fails, takes you to the "next compiler error".
  • F6: When compilation fails, takes you to the "previous error."
  • F5: Brings up the GNU debugger

Compiling and running code at the command line

To compile your program at the command line, use:

g++ -Wall -pedantic -ansi mycode.cpp -o mycode


To run your program at the command line, use:

./mycode