C++ const 关键字 class test { public: void fun()const; } 在函数的括号后面使用const将this限定为const,这样将不能使用this来修改对象的值