Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 688 Bytes

compiler-error-c2871.md

File metadata and controls

29 lines (24 loc) · 688 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2871
Compiler Error C2871
11/04/2016
C2871
C2871
44aeb84d-61f0-45e0-8dad-22a3cd46b7f8

Compiler Error C2871

'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.

Example

The following sample generates C2871:

// C2871.cpp
// compile with: /c
namespace a {
   int fn(int i) { return i; }
}
namespace b {
   using namespace d;   // C2871 because d is not a namespace
   using namespace a;   // OK
}