Expand Minimize
0 out of 45 rated this helpful - Rate this topic

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
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.