Export (0) Print
Expand All
Expand Minimize

Compiler Error C3060

Error Message

'member' : a friend function may not be defined inside a class using a qualified name (it may only be declared)

A friend function was defined using a qualified name, which is not allowed.

The following sample generates C3060:

// C3060.cpp
class A {
public:
   void func();
};

class C {
public:
   friend void A::func() { }   // C3060
   // Try the following line and the out of class definition:
   // friend void A::func();
};

// void A::func(){}

Community Additions

ADD
Show:
© 2015 Microsoft