look at the structure -- credit is an array of floats and you are attempting to use it as if it were a single float object. Change the structure to remove the arrays
struct cgrade
{
char course[50]; // room for 50 character course name
float credit;
float grade;
};
>>gets(GPA[i].course);
never, ever use gets() function because it can cause your program to crash if you enter more characters than the input buffer can hold. Use fgets() instead
fgets(GPA[i].course, sizeof(GPA[i].course), stdin);
Ancient Dragon
Retired & Loving It
30,040 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341