Hi All,

I'm having a problem with a friend function I am using. The darn thing just won't compile!

It goes something like this

class G 
     void reduce(H& Cost);
void G::reduce(H& Cost)
     Cost = Cost * 0.95;

and later

Class H

friend void reduce(H& Price);

float Price;

I get a few errors;
expected ; before ( token
void G::reduce(HardwareDevice& Cost) is not a static member of class G
H not declared in this scope
reduce not declared in this scope

Any ideas appreciated.


since you did not post the exact code I dobt anyone can help you. I hope that is not really the way you declared class H. :eek: