hw4 first part cpp finished