Transfer Python code to c++

Hello dear community, could you please help me to transfer a small piece of code from python to c++/

Here is a code:

        c = max(contours, key=cv2.contourArea)// contours is  std::vector<std::vector<cv::Point>>
        M = cv2.moments(c) 

        cx = int(M['m10']/M['m00'])
        cy = int(M['m01']/M['m00'])

I can’t find c++ example how to find the biggest contour? And after find a moments

Thank you