Compiler Error C2871
Collapse the table of content
Expand the table of content
This documentation is archived and is not being maintained.

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
© 2016 Microsoft