Error map

ISO C++ forbids converting a string constant C++: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

C/C++ · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (9). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

ISO C++ forbids converting a string constant — C++: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] (C/C++)ISO C++ for…Segmentation fault — C/C++: Segmentation fault (core dumped) — SIGSEGV from a null, dangling or out-of-bounds pointer (C/C++)Segmentation faultinvalid conversion from — C++: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] (C/C++)invalid conversion …E0608: cannot index into a value of type — Rust: error[E0608]: cannot index into a value of type `HashSet<i32>` / `String` cannot be indexed by `{integer}` (Rust)E0608: cannot index…makes pointer from integer without a cast — C: warning: assignment makes pointer from integer without a cast (C/C++)makes pointer from …incompatible pointer type — C: warning/error: passing argument from incompatible pointer type [-Wincompatible-pointer-types] (C/C++)incompatible pointe…will be initialized after — C++: warning: 'X::a' will be initialized after 'X::b' [-Wreorder] (C/C++)will be initialized…may be used uninitialized — C/C++: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized] (C/C++)may be used uniniti…address of local variable returned — C/C++: warning: address of local variable 'x' returned [-Wreturn-local-addr] (C/C++)address of local va…assignment to expression with array type — C: error: assignment to expression with array type (C/C++)assignment to expre…SIGSEGV — Segmentation fault (core dumped) (Linux)SIGSEGVdouble free or corruption — C/C++: free(): double free detected / double free or corruption (out) — Aborted (core dumped) (C/C++)double free or corr…control reaches end of non-void function — C/C++: warning: control reaches end of non-void function [-Wreturn-type] (C/C++)control reaches end…no matching function for call to — C++: error: no matching function for call to 'f(int, const char*)' (C/C++)no matching functio…does not name a type — C++: error: 'string' does not name a type (C/C++)does not name a typecall of overloaded is ambiguous — C++: error: call of overloaded 'f(int)' is ambiguous (C/C++)call of overloaded …E0277: the trait bound is not satisfied — Rust: error[E0277]: the trait bound `Foo: Display` is not satisfied / `Rc<RefCell<T>>` cannot be sent between threads safely (Rust)E0277: the trait bo…E0599: no method named found for type — Rust: error[E0599]: no method named `push_str` found for struct `Vec<String>` in the current scope (Rust)E0599: no method na…panic: index out of bounds: the len is N but the index is M — Rust: thread 'main' panicked at src/main.rs:5:5: index out of bounds: the len is 3 but the index is 3 (Rust)panic: index out of…invalid memory address or nil pointer dereference — Go: panic: runtime error: invalid memory address or nil pointer dereference (Go)invalid memory addr…ISO C++ forbids comparison between pointer and integer — C++: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] (C/C++)ISO C++ forbids com…implicit declaration of function — C: warning: implicit declaration of function 'foo' [-Wimplicit-function-declaration] (C/C++)implicit declaratio…discards qualifiers — C++: error: passing 'const X' as 'this' argument discards qualifiers [-fpermissive] (C/C++)discards qualifiersimplicitly deleted — C++: error: call to implicitly-deleted default constructor of 'X' (C/C++)implicitly deletedC2512 — MSVC: error C2512: 'X': no appropriate default constructor available (C/C++)C2512narrowing conversion — C++: error: narrowing conversion of 'x' from 'int' to 'char' inside { } [-Wnarrowing] (C/C++)narrowing conversionruntime error: — C/C++: runtime error: signed integer overflow / null pointer / shift exponent too large (UndefinedBehaviorSanitizer) (C/C++)runtime error:use-of-uninitialized-value — MemorySanitizer: use-of-uninitialized-value (C/C++)use-of-uninitialize…AddressSanitizer: heap-use-after-free — C/C++: ==ERROR: AddressSanitizer: heap-use-after-free on address — memory used after delete/free (C/C++)AddressSanitizer: h…cannot declare variable to be of abstract type — C++: error: cannot declare variable 'x' to be of abstract type 'Shape' (pure virtual functions) (C/C++)cannot declare vari…variable-sized object may not be initialized — C: error: variable-sized object may not be initialized (C/C++)variable-sized obje…reference to is ambiguous — C++: error: reference to 'X' is ambiguous (using namespace std conflicts) (C/C++)reference to is amb…

Directly related (9)

Segmentation faultC/C++

C/C++: Segmentation fault (core dumped) — SIGSEGV from a null, dangling or out-of-bounds pointer

The program touched memory it is not allowed to access — a null or dangling pointer, an out-of-range array index, or a stack over…

invalid conversion fromC/C++

C++: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]

C++ forbids silently dropping `const` or converting between unrelated pointer types — typically a string literal assigned to `cha…

E0608: cannot index into a value of typeRust

Rust: error[E0608]: cannot index into a value of type `HashSet<i32>` / `String` cannot be indexed by `{integer}`

The type doesn't support `[]` indexing (or not with that index type).

makes pointer from integer without a castC/C++

C: warning: assignment makes pointer from integer without a cast

An integer is assigned to a pointer (or the reverse) without conversion — often because a function was implicitly declared.

incompatible pointer typeC/C++

C: warning/error: passing argument from incompatible pointer type [-Wincompatible-pointer-types]

A pointer of one type is passed where another pointer type is expected.

will be initialized afterC/C++

C++: warning: 'X::a' will be initialized after 'X::b' [-Wreorder]

Members are initialised in declaration order, not in the order of the constructor's initialiser list.

may be used uninitializedC/C++

C/C++: warning: 'x' may be used uninitialized in this function [-Wmaybe-uninitialized]

A variable is read on some path before it is assigned.

address of local variable returnedC/C++

C/C++: warning: address of local variable 'x' returned [-Wreturn-local-addr]

The function returns a pointer or reference to a variable that no longer exists after it returns.

assignment to expression with array typeC/C++

C: error: assignment to expression with array type

C cannot assign one array to another with `=`.

Two steps away (22)

SIGSEGVLinux

Segmentation fault (core dumped)

A program accessed memory it wasn’t allowed to, and the kernel killed it with SIGSEGV (exit code 139).

double free or corruptionC/C++

C/C++: free(): double free detected / double free or corruption (out) — Aborted (core dumped)

Memory was freed twice or the heap was corrupted (buffer overflow, freeing a non-heap pointer), so glibc aborted the program.

control reaches end of non-void functionC/C++

C/C++: warning: control reaches end of non-void function [-Wreturn-type]

A function that promises a return value can finish without returning one on some path — undefined behaviour in C++.

no matching function for call toC/C++

C++: error: no matching function for call to 'f(int, const char*)'

No overload of the function accepts the arguments you passed — wrong count, wrong types, or a missing conversion.

does not name a typeC/C++

C++: error: 'string' does not name a type

Where the compiler expected a type, it found a name it does not know as one — a missing header, namespace, or class declared late…

call of overloaded is ambiguousC/C++

C++: error: call of overloaded 'f(int)' is ambiguous

Two or more overloads fit equally well, so the compiler refuses to guess which function you meant.

E0277: the trait bound is not satisfiedRust

Rust: error[E0277]: the trait bound `Foo: Display` is not satisfied / `Rc<RefCell<T>>` cannot be sent between threads safely

A type doesn't implement a trait required by a function, macro or generic bound.

E0599: no method named found for typeRust

Rust: error[E0599]: no method named `push_str` found for struct `Vec<String>` in the current scope

The type doesn't have that method — wrong type, trait not in scope, or missing derive/feature.

panic: index out of bounds: the len is N but the index is MRust

Rust: thread 'main' panicked at src/main.rs:5:5: index out of bounds: the len is 3 but the index is 3

A Vec/array/slice was indexed past its length.

invalid memory address or nil pointer dereferenceGo

Go: panic: runtime error: invalid memory address or nil pointer dereference

The program used a pointer, map, interface or struct field that was nil — usually an uninitialised value or an ignored error.

ISO C++ forbids comparison between pointer and integerC/C++

C++: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]

You compared a string literal or pointer with a character or integer — typically `ch == "y"` instead of `ch == 'y'`.

implicit declaration of functionC/C++

C: warning: implicit declaration of function 'foo' [-Wimplicit-function-declaration]

In C you called a function the compiler has not seen declared — usually a missing `#include`. Newer compilers treat it as an erro…

discards qualifiersC/C++

C++: error: passing 'const X' as 'this' argument discards qualifiers [-fpermissive]

A const object (or const reference) is calling a method that is not declared const, which could modify it.

implicitly deletedC/C++

C++: error: call to implicitly-deleted default constructor of 'X'

A class has no usable default constructor because a member or base cannot be default-constructed.

C2512C/C++

MSVC: error C2512: 'X': no appropriate default constructor available

A default-constructed object requires a default constructor that does not exist.

narrowing conversionC/C++

C++: error: narrowing conversion of 'x' from 'int' to 'char' inside { } [-Wnarrowing]

Brace initialisation `{}` refuses conversions that can lose data, such as `double` to `int` or a runtime `int` to `char`.

runtime error:C/C++

C/C++: runtime error: signed integer overflow / null pointer / shift exponent too large (UndefinedBehaviorSanitizer)

UBSan detected code that triggers undefined behaviour (overflow, null dereference, out-of-bounds index, bad shift, misaligned acc…

use-of-uninitialized-valueC/C++

MemorySanitizer: use-of-uninitialized-value

Uninitialised memory influenced a branch or output.

AddressSanitizer: heap-use-after-freeC/C++

C/C++: ==ERROR: AddressSanitizer: heap-use-after-free on address — memory used after delete/free

The program read or wrote a heap block after it had been freed; ASan shows who freed it and where it was allocated.

cannot declare variable to be of abstract typeC/C++

C++: error: cannot declare variable 'x' to be of abstract type 'Shape' (pure virtual functions)

You tried to create an object of a class that still has pure virtual functions; only a derived class that overrides all of them c…

variable-sized object may not be initializedC/C++

C: error: variable-sized object may not be initialized

A variable-length array was given an initialiser, which C forbids.

reference to is ambiguousC/C++

C++: error: reference to 'X' is ambiguous (using namespace std conflicts)

Two declarations of the same name are visible, usually because of `using namespace std`.