Hi. I am new to C++, coming from C# and Vb.NET. I have been trying to discover through book explanation and other online references exactly how to implement this friend functionality. I was able to declare and compile but now cannot access the friend function. Here is what I have.
@Thomas1965 and @Repeater , I get that it works when the class and the implementations are all done inside the same file but I am trying to put my friend function inside TestClass.h. I get now that you don't implement it inside TestClass.Cpp but inside the file you wish to use it but when I remove the getHiddenVar from Testclass.Cpp and add it to my file containing my main() like so: