CRect rect(0, 0, 100, 200); int height = rect.GetHeight();
CRect* pRect = new CRect(0, 0, 50, 75); int height = pRect->GetHeight(); delete pRect;This code dynamically allocates a CRect object with the top-left corner at (0,0) and the bottom-right corner at (50,75). It then retrieves the height of the rectangle using `GetHeight()`. Finally, the dynamically allocated memory is released using `delete`. Both examples use the MFC library for C++.