Update square.cpp

compiled and debugged the merge.