c++ segmentation fault (core dumped) code example
Example 1: segmentation fault
Segfaults are caused by a program trying to read or write an illegal memory location
Example 2: Segmentation fault (core dumped)
Core Dump/Segmentation fault is a specific kind of error caused by
accessing memory that “does not belong to you.”
In C++ this can be caused by:
~Accessing an address that is freed
~Accessing out of array index bounds
~Stack Overflow
~Dereferencing uninitialized pointer