왜 코드가 손상되는지 알 수 없으므로 도움을받을 수 있습니다. 모든C++ "undefined reference to ..."
첫째, 코드 :
Timer.h :
#include [...]
class Timer {
public:
[...]
Timer operator+(double);
[...]
private:
[...]
void correctthedate(int day, int month, int year);
[...]
};
Timer.cc :
#include "Timer.h"
using namespace std;
[...]
void correctthedate(int day, int month, int year) {
[...]
}
[...]
Timer Timer::operator+(double plush) {
[...]
correctthedate(curday, curmonth, curyear);
return *this;
}
내가 오류 얻을 컴파일하려고 :
을Timer.o: In function `Timer::operator+(double)':
Timer.cc:(.text+0x1ad3): undefined reference to `Timer::correctthedate(int, int, int)'
오른쪽 영역의 모든 포인터 임무? 감사!
시간/타이머? 여기에 믹스가 있습니다. – crashmstr