Segmentation fault during runtime of console code in C++
问题 I'm trying to make a simple console student details display system whereby there are 2 classes, class student(Base class) with member variables for name and registration number and class studentAthlete(Derived class) with sports type string. The code compiles sucessfully but on runtime only asks for student details but does not display the details as would be expected when I call the identify() function. On code blocks, the error might not show but on online compiles such as https://www