Squared in C++