C++ code for projects for CS161