I have an assignment that has a file with a bunch of students info listed. I made a student class to handle all of this and another thing i need to do is find which student has the highest GPA. Normally this would be easy and i would set array[0] to max, then compare that to next element and switch to max if needed. Problem is GPA is a float, and idk how i can set studentPTR[0] to GPA. I will post only my main file here, but if you would like to see my header, or class implementation file let me know.
i didn't put it in yet cause everything i tried didn't work so i just removed it. and yes i meant max = array[0]. The part of code you selected is putting the info i read in into the array. what i need to do is find the max of just GPA. it would go after that part. Max should not go in the student class. I have tried things like max = studentPtr[0], but i cannot do it because studentPtr is part of the student class, and max needs to be a float.