Assignment3 cpp