How to use friend functions.

Eljay Love-Jensen eljay@adobe.com
Tue Mar 2 13:48:00 GMT 2004


Hi Jeff,

Could you provide a 10-20 line (nearly) compilable illustrative example of 
what you are trying to attempt.

I'm using GCC 3.3.1 and my attempt to recreate your issue failed, since the 
friend function worked fine in my toy program.

In the absence of such an example, I suspect that your problem is that you 
are not forward declaring your function before declaring it a friend in 
your class.

Thanks,
--Eljay



More information about the Gcc-help mailing list