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
{
protected:
public:
void reduce(H& Cost);
};
void G::reduce(H& Cost)
{
Cost = Cost * 0.95;
}
and later
Class H
protected:
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.
Thanks