0

I cant seem to figure out where im going wrong.I keep getting the error

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

Me definition in the header file as follows

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;}

then in my cpp file i have this. My data types match up so i know that isnt the problem. Any help would be much appreciated.

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){}
Kim94
  • 3
  • 2
  • Are you sure that you compile the file that contains the second constructor? – Phil1970 Sep 13 '17 at 00:40
  • Is the code used from a file in the same project as the one that contains that class? – Phil1970 Sep 13 '17 at 00:41
  • Yes the code is in the same project as the one with the class. I'm compiling with the following command "g++ -std=c++11 TicketSystem.cpp -o run" . TicketSystem's header file includes the header file i showed part of above which is process.h. – Kim94 Sep 13 '17 at 01:00

0 Answers0