Free C++ tool

C++ Error Explorer

Paste a compiler, linker, or runtime diagnostic to see what it means and its common causes. Where CppPath has verified examples for that message, the explorer shows them. Every result links to a troubleshooting guide.

Supported errors

The explorer recognizes these verified GCC and MSVC messages. It links each result to a complete guide.

Compiler errors

  • Name was not declared in this scope Compiler error

    GCC: 'cout' was not declared in this scope. MSVC: C2065, C3861, C2039.

    The compiler cannot find a declaration for a name where the code uses it.

    Read the guide
  • No matching function for call Compiler error

    GCC: no matching function for call to. MSVC: C2665, C2664.

    The compiler found a function with that name, but none of its overloads accepts the supplied arguments.

    Read the guide
  • Expected semicolon Compiler error

    GCC: expected ';' before. MSVC: C2143, C2628, C1075.

    The parser reached a token where a statement or declaration needed a semicolon first.

    Read the guide
  • Expected primary expression Compiler error

    GCC: expected primary-expression before. MSVC: C2144, C2059, C2275.

    The parser expected a value-producing expression but found a type, operator, or closing delimiter instead.

    Read the guide
  • Does not name a type Compiler error

    GCC: 'string' does not name a type. MSVC: C4430.

    The compiler expected a type name but could not resolve the name at that declaration.

    Read the guide
  • Invalid conversion from const char* Compiler error

    GCC: invalid conversion from 'const char*' to 'char'. MSVC: C2440, C2664.

    The code converts text or another value to a type that cannot represent it through that conversion.

    Read the guide
  • No such file or directory Compiler error

    GCC: fatal error: iostrem: No such file or directory. MSVC: C1083.

    The preprocessor cannot open the header named by an include directive.

    Read the guide
  • Jump to case label Compiler error

    GCC: error: jump to case label. MSVC: C2360, C2361.

    A switch label can jump past an initialization in the same switch scope.

    Read the guide
  • Lvalue required as left operand of assignment Compiler error

    GCC: error: lvalue required as left operand of assignment. MSVC: C2106.

    The assignment target is not a modifiable object.

    Read the guide
  • Expected unqualified-id Compiler error

    GCC: error: expected unqualified-id before 'return'. MSVC: C2059.

    The parser expected a declaration but found a token that cannot start one in the current scope.

    Read the guide
  • Stray character in program Compiler error

    GCC: error: extended character “ is not valid in an identifier; error: stray '\NNN' in program. MSVC: C2018, C3872, C3873.

    The compiler found a source character that does not form a valid token in that position.

    Read the guide
  • No match for operator<< Compiler error

    GCC: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'Record'). MSVC: C2679.

    No visible stream insertion overload accepts the type of the right-hand operand.

    Read the guide
  • Discards qualifiers Compiler error

    GCC: error: passing 'const Counter' as 'this' argument discards qualifiers [-fpermissive]. MSVC: C2662.

    A const object calls a member function whose implicit this pointer permits mutation.

    Read the guide

Linker errors

  • Undefined reference Linker error

    GCC: undefined reference to. MSVC: LNK2019, LNK2001, LNK1120, LNK1561.

    The source compiled, but the linker could not find a definition for a symbol the program uses.

    Read the guide
  • Multiple definition Linker error

    GCC: multiple definition of. MSVC: LNK2005, LNK1169, C2084.

    The build defines the same external function or object more than once.

    Read the guide

Runtime errors

  • Vector subscript out of range Runtime error

    GCC: vector::_M_range_check. MSVC: not verified yet.

    The program accessed a vector index that is outside the elements currently stored in that vector.

    Read the guide
  • Terminate called after throwing Runtime error

    GCC: terminate called after throwing an instance of. MSVC: not verified yet.

    An exception escaped the program without a matching handler, so the C++ runtime terminated the process.

    Read the guide

Warnings

  • Control reaches end of non-void function Warning

    GCC: control reaches end of non-void function. MSVC: C4715.

    A non-void function can reach its closing brace without returning a value on every path.

    Read the guide
  • Signed and unsigned comparison warning Warning

    GCC: comparison of integer expressions of different signedness. MSVC: not verified yet.

    A comparison mixes signed and unsigned integer values, so C++ converts one operand before comparing them.

    Read the guide

How to read a C++ error message

Start with the first error diagnostic. Later errors often follow because the compiler or linker cannot make sense of code after the original mistake. Fix that first cause, then rebuild and read the new output. A location such as main.cpp:12:8 names a file, line, and column. Visual Studio often writes the same location as main.cpp(12,8). Open that line, then inspect the expression immediately before the highlighted token.

An error prevents a build or reports a failure at runtime. A warning identifies code that compiles but may behave unexpectedly. A note adds context, such as the declaration associated with an error. Compiler messages describe source translation. Linker messages describe combining object files and resolving symbols. Runtime messages appear after the program starts. One missing semicolon, brace, or declaration can make later lines parse incorrectly and produce a cascade of diagnostics. Do not fix every line at once. Correct the earliest meaningful error, rebuild, and check whether the remaining messages still apply.