My questions is: if a static variable (access level: private) is defined in a class and we want to access it by non static function of that class. . is it possible in c++?
Asked
Active
Viewed 115 times
-5
-
4Have you tried to do this? It would take less effort than this post. live link: https://godbolt.org/g/U4291s – Richard Critten May 23 '18 at 20:14
1 Answers
0
The answer is yes.
This question was already somewhat asked here: Can non-static methods modify static variables
You are just asking if it can access it though - I am fairly certain if you can modify something, that means you can also access it.

Mark Hollis
- 151
- 1
- 13