it seems that when the computer tries to run the function display_status, the terminal shows the error segmentation fault (core dumped), and when I remove the function from main(), the project doesn’t want to save. It just infinity loads.
In both of your
for loops you are iterating beyond the length or size of the array and vector. Your index variable starts at 0, but the length and size properties start counting from 1. Change
<= to just
Hopefully that helps.
Thanks! this worked.