Compiler Error C2868
'identifier' : illegal syntax for using-declaration; expected qualified-name
A using declaration requires a qualified name, a scope-operator (::
) separated sequence of namespace, class, or enumeration names that ends with the identifier name. A single scope resolution operator may be used to introduce a name from the global namespace.
Example
The following sample generates C2868 and also shows correct usage:
// C2868.cpp
class X {
public:
int i;
};
class Y : X {
public:
using X::i; // OK
};
int main() {
using X; // C2868
}
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