Export (0) Print
Expand All
Expand Minimize

Compiler Error C3861

'identifier': identifier not found

The compiler was not able to resolve a reference to an identifier, even using argument-dependent lookup.

The following sample generates C3861.

// C3861.cpp
void f2(){}
int main() {
   f();   // C3861
   f2();   // OK
}

Exception classes in the Standard C++ Library are now in the std namespace.

// C3861_b.cpp
// compile with: /EHsc
#include <iostream>
int main() {
   try {
      throw exception("Exception");   // C3861
      // try the following line instead
      // throw std::exception("Exception");
   }
   catch (...) {
      std::cout << "caught an exception" << std::endl;
   }
}

Community Additions

ADD
Show:
© 2014 Microsoft