I have a class A from which classes B and C derive. There is an existing anonymous namespace method in class C. Now, the idea is to pull it out to the parent class. here is my question. If I define a namespace [ anonymous ] in A and ddefine this method 'callMePlease' there, would I be able to use it in say, either B or C?.
This is what I have tried. In my A.hxx, if I declare & define the method, I am able to do so. However, if I declare the method in A.hxx and define its body A.cxx, i am getting a linking error when I try to use it in C.cxx
Can someone please help me understand this?. Is there a way to do this?.