I have made a class and I have an operator overloaded...I have a few members functions (they are members because they use the member data)....I have declared a function which doesn't use any member data and that function is used by the operator += which is overloaded in the class....what happens is when I compile the program the compiles says to me that that function was not declared in the scope...I could do that function a member, but I wouldn't like to do that..how could i do it?? here I post what matter of the program.....
To summarize...I would like to make visible that function without making a member of the class becasue in fact expand function( is the one) doesn't get any member data...
Line 54: You either need to declare expand as a member of String, or provide a forward declaration for it. At the point the compiuler processes line 39, it does not know what expand looks like.