Ok first off I am in CompSci I at college and this is a problem with a program I am doing.
I have a struct with 2 strings, 3 floats, and 3 int arrays. Plus I have a bunch of structs in one array. :roll:
Anyhow I am trying to sort the array of structs into order based on one of the floats. I know the process what I am having problem with is I am getting 2 errors I don't know how to fix. I am unfamiliar with structs so it may be just that.
#1: In my int main() I am trying to call a funtion using my main array and I am getting this error:Error 406: "FinalLab.cc", line 108 # Argument type 'StudentInfo *' does not match expected parameter type 'student *'; '
struct StudentInfo' is not an unambiguously derived class of 'tentative struct student'.
I am using "void SortByTestAverage(struct student, int& studentNumber);"
#2: In my funtion that swaps the info between two indexes in my array I am getting this: Error 24: "FinalLab.cc", line 121 # '<identifier>' expected instead of 'student'.
This confuses the hell out of me and I am using a similar viod to #1
oh I found another the "cs" up there in 2 is a global variable that is getting: Error 249: "FinalLab.cc", line 122 # Subscript operator must have pointer to object and integral operands; 'int[int]' was found.
any help with my homework would be wonderfull hehe. :lol: