C++20 sections · 1024 units
Open in CourseQuiz: Static and Const Members
Knowledge check
Check Your Understanding
How do you access a static member variable of a class?
- A.Using the this pointer inside member functions
- B.Using the dot operator on any object: obj.member
- C.Using the class name with scope resolution: ClassName::member
- D.Static members cannot be accessed directly