🔧 C/C++ errors

C and C++ compiler, linker and runtime errors — undefined references, segfaults, memory corruption and exceptions.

CodeErrorWhat it means
double free or corruption 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 abor…
undefined reference to C/C++: undefined reference to `function' — collect2: error: ld returned 1 exit status The linker can’t find the definition of a function or variable that was declared and used.
terminate called after throwing an instance of C++: terminate called after throwing an instance of 'std::out_of_range' — what(): vector::_M_range_check A C++ exception wasn’t caught anywhere, so std::terminate aborted the program. what() tells you the reason.