Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I'm trying to do this code but I can't find what wrong with it. It does not give me the output I'm expecting. I've included
I'm trying to do this code but I can't find what wrong with it. It does not give me the output I'm expecting. I've included the output, instructions, and the C++ code:
Lab03.cpp
Grades.h
Grades.cpp
mming II Laboratory ID: #134972 ;i++) { nitialScores) { ; i++) { es[1]; student Number) { S; i++) { Ln 74, Col 1 History /home/runner/Lab03/./Grades.cpp:21: multiple definition of 'Gr ades::Grades(int const*)'; /tmp/main-c788a6.0:/home/runner/Lab 83/./Grades.cpp:21: first defined here /nix/store/039g378vc3pc3dv19dzdrd@14q93qwf-binutils-2.39/bin/ ld: /tmp/Grades-8d3f61.0: in function Grades': /home/runner/Lab03/./Grades.cpp:15: multiple definition of 'Gr ades::Grades()'; /tmp/main-c788a6.0:/home/runner/Lab03/./Grade s.cpp:15: first defined here /nix/store/839g378vc3pc3dv19dzdlrd014q93qwf-binutils-2.39/bin/ ld: /tmp/Grades-8d3f61.0: in function Grades': /home/runner/Lab83/./Grades.cpp:27: multiple definition of 'Gr ades::~Grades()'; /tmp/main-c788a6.0:/home/runner/Lab83/./Grad es.cpp:27: first defined here /nix/store/839g378vc3pc3dv19dzdlrd@14q93qwf-binutils-2.39/bin/ ld: /tmp/Grades-8d3f61.0: in function Grades': /home/runner/Lab03/./Grades.cpp:27: multiple definition of 'Gr ades::~Grades()'; /tmp/main-c788a6.0:/home/runner/Lab83/./Grad es.cpp:27: first defined here /nix/store/839g378vc3pc3dv19dzdrde14q93qwf-binutils-2.39/bin/ ld: /tmp/Grades-8d3f61.0: in function Grades::getAverage() co nst': /home/runner/Lab83/./Grades.cpp:44: multiple definition of 'Gr ades::getAverage() const'; /tmp/main-c788a6.0:/home/runner/Lab 03/./Grades.cpp:44: first defined here /nix/store/839g378vc3pc3dv19dzdlrd014q93qwf-binutils-2.39/bin/ ld: /tmp/Grades-8d3f61.0: in function Grades::printGrades (int ) const': /home/runner/Lab83/./Grades.cpp:64: multiple definition of 'Gr ades::printGrades (int) const; /tmp/main-c788a6.0:/home/runner /Lab03/./Grades.cpp:64: first defined here /nix/store/839g378vc3pc3dv19dzdlrd@14q93qwf-binutils-2.39/bin/ Ld: /tmp/Grades-8d3f61.0: in function Grades::getAverage() co nst': /home/runner/Lab03/./Grades.cpp:44: multiple definition of 'Gr ades::getGrade() const'; /tmp/main-c788a6.0:/home/runner/Lab03 /./Grades.cpp:44: first defined here clang-12: error: Linker command falled with extt code 1 (use - v to see invocation) make: *** [Makefile:10: main] Error 1 exit status 2
Step 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