Is it possible to access private members of a class in c++.
See Question&Answers more detail:osprovided you don't have a friend function and You don't have access to the class definition
Is it possible to access private members of a class in c++.
See Question&Answers more detail:osprovided you don't have a friend function and You don't have access to the class definition
You mean using some pointer arithmetic to gain the access ? It is possible but is definitely dangerous. Take a look at this question also: Accessing private members