Export (0) Print
Expand All
Expand Minimize

Compiler Error C2871

Error Message

'name' : a namespace with this name does not exist

This error will occur when you pass an identifier that is not a namespace to a using directive.

The following sample generates C2871:

// C2871.cpp
// compile with: /c
using namespace d;   // C2871 d is not a namespace
using namespace System;   // OK

Community Additions

© 2015 Microsoft