On the following line
for(student_type *p; p<=&studs[1]; ++p){
You should initialize the variable p
is not initialized. You should set it to a known value. I guess you’d want to initialize it as follows. Also your stop condition goes one too far: use <
instead of <=
.
for(student_type *p=studs; p<&studs[1]; ++p){
3
solved c++ (My code is stuck in the first function) [closed]