Weatherford interview question

C++ structure and class