Ask coding questions

← Back to all posts
segmentation faults are my worst enemy
JasonLiu19 (70)

I want to make a table, and in each column have a different field for each object of the class Teacher, but I keep getting a segfault.

My first idea was to group all the fields and print them out in order, but either I was being a complete idiot and could not get it to work or just got a segfault. I then used the fool-proof switch, but I still get a segfault.

So how do you not get a segfault? (the error is from line 107 of teacher.hpp)