CPP- I am getting Segmentation fault (core dumped)?

That’s why there are debug tools like gdb (just google for it 😉 ). This is the backtrace: #0 0x00000000004009ba in node::setnext (this=0x0, x=0x614cc0) at a.cpp:25 #1 0x0000000000400c18 in list::insertend (this=0x7fffffffdf10, x=45) at a.cpp:109 #2 0x00000000004008df in main () at a.cpp:137 that means in line 137 there is a function call (l.insertend(45)), then in line … Read more