the_nice_guy 27 Newbie Poster
hi I am new in c++ although I am reading about ti for a while now :).
recently a made a silly code that I can not compile so please some help about it.
ps: befo you even star to read it the following errors ocure while compilling Undefined reference to :base_employ,menager,engineers,researcher
#include<iostream>
#include<string>
using namespace std;
class base_employ
{
protected:
string First_Name;
string Last_Name;
double Salery;
public:
base_employ();
base_employ( string &FN, string &LN, double S)
{ First_Name=FN;
Last_Name=LN;
Salery=S;
}
void get_FN(string FN)
{ getline(cin,FN);}
string set_FN()
{return First_Name;}
void get_LN(string LN)
{ getline(cin,LN);}
string set_LN()
{return Last_Name;}
void get_S(double S)
{cin>>S;}
double set_S()
{return Salery;}
void Print()
{ cout<<"First Name:"<<" "<<First_Name<<endl;
cout<<"Last Name:"<<" "<<Last_Name<<endl;
cout<<"Salery:"<<" "<<Salery<<endl;
}
};
class manager : public base_employ
{ private:
int Meet_per_week;
int Vacation_days_pyear;
public:
manager();
manager( string &FN, string &LN, double S,int MPW,int VdPY) : base_employ (FN,LN,S)//metodata menager nasleduva od metodata base_employ
{ Meet_per_week=MPW;
Vacation_days_pyear=VdPY;
}
void get_MPW(int MPW)
{ cin>>MPW; }
int set_MPW()
{ return Meet_per_week;}
void get_VdPY(int VdPY)
{cin>>VdPY;}
int set_VdPY()
{return Vacation_days_pyear;}
void Print_M_Stat()
{ base_employ::Print();
cout<<"Meetingd per week:"<<" "<<Meet_per_week<<endl;
cout<<"Vacation days per year:"<<" "<<Vacation_days_pyear<<endl;
}};
class engineers : public base_employ
{ private:
char Value; //Y ako znaat C++ & N ano ne go poznavaat
int Years_Experience;
string sort_engineer;
public:
engineers();
engineers( string &FN, string &LN, double S, char V, int YE,string &sortE ) : base_employ (FN,LN,S)
{ Value=V;
Years_Experience=YE;
sort_engineer=sortE;
}
void get_value(char V)
{cin>>V;}
char set_value()
{ return Value;}
void get_YE(int YE)
{ cin>>YE;} …
tux4life commented: if( post == 1 && code_tags ) rep += 10; :P +10
VernonDozier commented: Code tags on first post! +17