added cpp version
Merge branch 'master' of https://github.com/CrazyWearsPJs/cs161_lab7
added cpp version