Assignment 2 of C++