Compiler Error C3161
'interface' : nesting class, struct, union or interface in an interface is illegal; nesting interface in a class, struct or union is illegal
An __interface can only appear at global scope or within a namespace. A class, struct, or union cannot appear in an interface.
Example
The following sample generates C3161.
// C3161.cpp
// compile with: /c
__interface X {
__interface Y {}; // C3161 A nested interface
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for