经过研究发现。c++里面的const意思是说,我是const,成员也是const!!!

xiaoxiao2021-02-28  54

class A1{ int i;public :   const  A1&  getA1 () const;};   const A1&  A1::getA1  () const{ return *this;};

转载请注明原文地址: https://www.6miu.com/read-73022.html

最新回复(0)