I have two classes everyone with private data.
I want only one function from each class to access private data from another class. I have checked "friend" function but It needs the class object as an argument. That is making things complicated on my side and I have no idea on how to do this.
Is this possible? If yes, how can I archieve that?