Hello, I'm newly registered here but I use this site for reference a lot. I recently started my second semester in college and with it came a new set of rules from a new programming class. I'm stuck on structs I have it down to 5 errors that I just cannot figure out. I'm stuck lost and stressed
the code is here- http://pastebin.com/b5fDX4Qr
I don't know how I should break it up so you guys can see just the parts that need to be seen so that's the whole of it.
The first error is on line 81 and reads-
|error: cannot convert 'std::string*' to 'CourseGrade*' for argument '1' to 'void dispCourses(CourseGrade*, int, const char*, int)'|
The other 3 are all on line 316 and each read sequentially-
error: 'arrNames' was not declared in this scope|
error: 'arrCreditHours' was not declared in this scope|
error: 'arrGrades' was not declared in this scope|
the last 3 look like easy fixes if I can just get past the first one.
Please help T^T
dispCourses() expects an array of CourseGrade elements as first argument, which I suppose you're supposed to create using 'arrCourseNames', 'arrCreditHours' and 'arrGrades'
Currently you're passing these arrays separately, so the first argument is an array of strings
Either modify the function to accept different parameters or create an array of CourseGrade objects and pass it to the function