My second assignment in C++