Implements max-heap base on c++