Compiler Error C2798
'super::member' is ambiguous
Multiple inherited structures contain the member you referenced with super. You could fix the error by either:
Removing B1 or B2 from the inheritance list of D.
Changing the name of the data member in B1 or B2.
The following sample generates C2798:
// C2798.cpp
struct B1 {
int i;
};
struct B2 {
int i;
};
struct D : B1, B2 {
void g() {
__super::i = 4; // C2798
}
};
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