const成员函数的格式:只要在函数后加上一个const就可以了
Type ClassName:: function ( Type p ) const
int getFoot ( void ) const{
return this->foot;
}
https://blog.51cto.com/chen0547/2052589?utm_source=oschina-apphttps://blog.51cto.com/chen0547/2052589?utm_source=oschina-app