Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/base35/errorbase.net/qa-include/qa-db.php on line 50
Error C2798: 'super::member' is ambiguous - Errorbase
Follow Us
Contribute
  • Register

Error C2798: 'super::member' is ambiguous

0 votes

Multiple inherited structures contain the member you referenced with super. Ex:


struct B1 {
   int i;
};

struct B2 {
   int i;
};

struct D : B1, B2 {
   void g() {
      __super::i = 4; // C2798
   }
};

requested 6 years ago by errorbase (170,010 points)

2 Solutions

0 votes

This article is a derivative work based on http://msdn.microsoft.com/en-us/library/cbshbd77.aspx" title="http://msdn.microsoft.com/en-us/library/cbshbd77.aspx" target="_blank">Compiler Error C2798 which is provided by http://msdn.microsoft.com/en-us/library/60k1461a.aspx" title="http://msdn.microsoft.com/en-us/library/60k1461a.aspx" target="_blank">MSDN Community Content - Visual C++.

solved 6 years ago by errorbase (170,010 points)
0 votes

Possible resolutions:


  1. Removing B1 or B2 from the inheritance list of D.

  2. Changing the name of the data member in B1 or B2.



solved 6 years ago by errorbase (170,010 points)

Related errors