From a33875ce05bcc5a2d02348308ea6caa89d095784 Mon Sep 17 00:00:00 2001 From: "faisal.rafi" Date: Tue, 30 Nov 2021 16:23:46 +0100 Subject: [PATCH] Update Pointer-to-Class-Members.md Correcting the (typo) error --- Chapter 3/Pointer-to-Class-Members.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.