नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'identifier' : 'friend' cannot be used during type definition
Remarks
The friend declaration includes a complete class declaration. A friend declaration can specify a member function or an elaborated type specifier, but not a complete class declaration.
Example
The following example generates C2391:
// C2391.cpp
// compile with: /c
class D {
void func( int );
};
class A {
friend class B { int i; }; // C2391
// OK
friend class C;
friend void D::func(int);
};