diff --git a/Chapter 3/Pointer-to-Class-Members.md b/Chapter 3/Pointer-to-Class-Members.md index df8870f..a2b7659 100644 --- a/Chapter 3/Pointer-to-Class-Members.md +++ b/Chapter 3/Pointer-to-Class-Members.md @@ -53,7 +53,7 @@ Notice that static member variables belong to the class instead of objects. So i int main() { int *p = &Test::mb; *p = 30; - cout << t->Test::mb << endl; // 30 + cout << Test::mb << endl; // 30 return 0; } ``` @@ -125,4 +125,4 @@ void bar() { The underlying principle is complicated, including implicit type conversion and polymorphism of member functions. Notice that C++ is a language with long history, and there are many historical issues. We don't have to, and can not understand all of them. In the above case, we only need to remember that *&* with function name is always a correct way in using function pointers. -> For more explanations, please refer to C++ standard n3376 - 4.3 - 1 and n3337 - 5.3.1 - 4. \ No newline at end of file +> For more explanations, please refer to C++ standard n3376 - 4.3 - 1 and n3337 - 5.3.1 - 4.