c++ class triangle