Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My main() file does not call to the class created in a .hpp file. It comes out with the error undefined reference to ___ const.

My main() file does not call to the class created in a .hpp file. It comes out with the error "undefined reference to "___" const.

I want to solve this by only changing the main() .cpp file, not the .hpp file.

.cpp file

image text in transcribed

.hpp file

image text in transcribed

Thank you!

include include tinclude "CourseMember.hpp using namespace std int main0 CourseMember CourseMember(90, "Jeff", "Goldblum"): // initializing the constructor cout class CourseMember public: Parameterized constructor param id the student's unique identifier aram first the student's first rame param last the student 's last name CourseMember (int id, std::string first, std::string last) //xxxxxxxxxx Accessor Methods xxxxxxxxxxxxxxxx /kk @return returns id ; int getIDi const; x greturn returns first name / std::string getFirstName ) const; /x greturn returns last name/ std::string getLastName () const; private: int id. /.. the CourseMember's ID std:string first name ; /Ak the CourseMember's first name std::string last name: the CourseMember's last name " : //end CourseMember #endif /* CourseMember. Ipp */

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions