共用方式為


編譯器錯誤 C3060

'member': Friend 函式不可使用限定名稱在類別中定義 (只可以宣告)

使用限定名稱定義了 Friend 函式,這是不允許的做法。

下列範例會產生 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(){}