0
How to access a private function without using a public function inc++
3 Answers
+ 2
you can use "friend" keyword to allow certain functions to access tho. Or if its not your code and you really need to use a private variable, you can just remove the private identifier
+ 1
Private members can only be accessed from inside your class.
+ 1
If you want to use the function from outside, why privatize it in the first place? The point of a private function is to forbid this very thing!