Question
Please help fix compiler errors in C++ programs. My issue is that I have a hard time understanding pointers so I don't know how to
Please help fix compiler errors in C++ programs.
My issue is that I have a hard time understanding pointers so I don't know how to fix this
Getting Compiler Error C3867: non-standard syntax use & to create a pointer to member
bool Classroom::assignStudentAt(int row, int col, Student *tempStudent) {
Student seatedStudent = seating[row][col];
if (!strcmp(seatedStudent.getFirstName(), "???") && !strcmp(seatedStudent.getLastName(), "???")) { // getting error here for getFirstName and getLastName
seating[row][col] = *tempStudent;
return 1;
}
return 0
}
in a separate file are the methods:
char* Student::getFirstName() {
return this->first_name;
}
char* Student::getLastName() {
return this->last_name;
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started