c ++错误未定义的引用错误

时间:2017-09-13 00:36:29

标签: c++ error-handling

我似乎无法弄清楚我哪里出错。我不断收到错误

undefined reference to Process::Process(std::string,int,int,int,int,int,int,int,int)

我在头文件中的定义如下

public: Proccess(){} Proccess(string n, int arrtime, int prior, int a, int totalTick, int e = -1, int run = 0,int r = -1,int wait = 0); inline string Name() const {return name;} inline int Arrival() const {return arrival;} inline int End() const {return end;} inline int Ready() const {return ready;} inline int Running() const {return running;} inline int Waiting() const {return waiting;} inline int Age() const {return age;} inline int Priority() const {return priority;}

然后在我的cpp文件中我有这个。我的数据类型匹配,所以我知道这不是问题。任何帮助将不胜感激。

Proccess::Proccess(string n, int arrtime, int prior, int a, int totalTick, int e, int run , int r ,int wait )
: name(n), arrival(arrtime), priority(prior), age(a), totalTickets(totalTick), end(e), running(run), ready(r),
  waiting(wait){}

0 个答案:

没有答案