Is it possible to either...
a) Allow a static member function to access private / protected members of the class
b) Brings a friend function into the same namespace as the class it befriends
Why? Because I want to do something like this:
It's how I usually form loading functions in C# and I'm hoping to do something similar in C++. Is this possible? It just seems silly that a static member function can't access the private members of a class, even though it is a member.Code:CTextFile* text = CTextFile::LoadFile ("C:\\Test.txt");![]()




Reply With Quote