Question
Hello I need help with fixing a C++ program, where the user will compare two students grades. The problem is that it compiles an error
Hello I need help with fixing a C++ program, where the user will compare two students grades. The problem is that it compiles an error message around GetGrades and GradesAreSame.
Program Requirements:
1. Use two arrays of doubles for the grades.
2. Use a global constant for the max size of the arrays
3. Use a void function called GetGrades that accepts a single argument (one array) and prompts the user for grades to enter.
4. Use a boolean function called GradesAreSame that accepts two arguments (both arrays) as constant parameters. It should return true if both arrays are the same and false if the arrays are different.
Getting student one Enter grade: 5 Enter grade: 5 Enter grade: 0 Enter grade: 0 Enter grade: 7 Getting student Two Enter grade: 5 Enter grade: 5 Enter grade: 0 Enter grade: 0 Enter grade: 7 Both students have the SAME grades! 2. Sample Run 2 Getting student one Enter grade: 100.00 Enter grade: 98.87 Enter grade: 87.60 Enter grade: 77.98 Enter grade: 33.23 Getting student Two Enter grade: 100.00 Enter grade: 97.87 Enter grade: 33.23 Enter grade: 87.60 Enter grade: 77.98 Both students have DIFFERENT grades! 3. Sample Run 3 Getting student one Enter grade: 98.2 Enter grade: 88.3 Enter grade: 77.0 Enter grade: 100.2 Enter grade: 98.1 Getting student Two Enter grade: 98.2 Enter grade: 88.3 Enter grade: 77.0 Enter grade: 100.2 Enter grade: 98 Both students have DIFFERENT grades! /Closed-Lab-10-rsetd\$ g++ main.cpp / nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /tmp/cc03ESmB.0: in function ' main': main.cpp:(.text.startup+0x55): undefined reference to 'GetGrades(double, int)' ix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: main.cpp:(.text.startup+0x8b): undefined reference to 'GetGrades(double, int)' ix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: main.cpp:(.text.startup+0x9d): undefined reference to 'GradesAreSame(double, double, int)' collect2: error: ld returned 1 exit statusStep 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