c++ - How to fix this problem
typecho
typecho 2017-06-08 11:01:30
0
2
696

Code:

// 获取面积和周长
double      getArea()
{
    return sqrt((m_posLeftTop.getX - m_posRightBottom.getX)*(m_posLeftTop.getX - m_posRightBottom.getX)*(m_posLeftTop.getY - m_posRightBottom.getY)*(m_posLeftTop.getY - m_posRightBottom.getY));
}
double      getCircumference()
{
    return (fabs(m_posLeftTop.getX - m_posRightBottom.getX) + fabs(m_posLeftTop.getY - m_posRightBottom.getY)) * 2;
}

typecho
typecho

Following the voice in heart.

reply all(2)
Peter_Zhu

m_posLeftTop.getX()

学习ing

I’m not sure about your code.

If m_posLeftTop is a pointer, change it to m_posLeftTop->getX
If getX is a method, change it to m_posLeftTop.getX()
If it is both of the above, change it to m_posLeftTop->get()

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template