12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #if(0)
- #include <iostream>
- class Person
- {
- public:
- void showClassName()
- {
- std::cout << "This is Person class" << std::endl;
- }
- void showPersonAge()
- {
-
- if (this == NULL)
- {
- return;
- }
- std::cout << "age = " << this->m_Age << std::endl;
- }
- int m_Age;
- };
- void test01()
- {
- Person* p = NULL;
-
-
-
- p->showPersonAge();
- }
- int main()
- {
- test01();
- system("pause");
- return 0;
- }
- #endif
|