Compiler Error C3861

'identifier': identifier not found

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

Example

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. See Breaking Changes in the Standard C++ Library for more information.

// 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;
   }
}