I was given code I was supposed to run for class but I get this error every time.
Undefined symbols for architecture x86_64:
"Date::Date(int, int, int)", referenced from:
_main in DateDriver-2fbcc2.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using Visual Studio Code, so could that be the problem (though other people in class said it ran for them just fine)?
class MonthError
{};
class DayError
{};
class YearError
{};
class Date
{
public:
Date();
Date(int initMonth, int initDay, int initYear);
// Knowledge Responsibilities
int GetMonth() const;
int GetDay() const;
int GetYear() const;
booloperator<(const Date& otherDate) const;
booloperator>(const Date& otherDate) const;
booloperator==(const Date& otherDate) const;
private:
int month;
int day;
int year;
};
***************************************
***************************************
The DateDriver.cpp file where I'm getting the error