Compiler Error C2868

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C2868.

identifier' : illegal syntax for using-declaration; expected qualified-name

A using declaration requires a qualified name.

The following sample generates C2868:

// C2868.cpp  
class X {  
public:  
   int i;  
};  
  
class Y : X {  
public:  
   using X::i;   // OK  
};  
  
int main() {  
   using X;   // C2868  
}  

Show: