Answer the question
In order to leave comments, you need to log in
How to access private fields without friend functions?
Let's say we need to write a List class. We have a Node class. Correctly, all fields of a class should be private. But how then can you get access to the private fields of the Node in the List without friend-functions?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question