compiles and runs fine.Code:int main () { int Choise; cout <<"Welcome! "<< endl; string loser =""; employee *Eptr = new workman (loser,loser,0,0); return 0; }
does not compile and gives error:Code:int main () { int Choise; cout <<"Welcome! "<< endl; employee *Eptr = new workman ("","",0,0); return 0; }
"main.cpp": E2285 Could not find a match for 'workman::workman(char *,char *,int,int)' in function main() at line 31
why the ........ does this not compile!? it is like? the same thing annyway!
workman (string &fname,string &lname,int hours, double salary); => workman constructor
employee ( string &, string &, int = 0 , double = 0 ); => employee constructor