1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
-
- #include <iostream>
- class Person
- {
- public:
-
-
-
-
- void showPerson() const
- {
- this->m_B = 100;
-
-
- }
- void func()
- {
- m_A = 100;
- }
- int m_A;
- mutable int m_B;
- };
- void test01()
- {
- Person p;
- p.showPerson();
- }
- void test02()
- {
- const Person p;
-
- p.m_B = 100;
-
- p.showPerson();
-
- }
- int main()
- {
- system("pause");
- return 0;
- }
|