You've mixed up your class members with the parameters there.Code:Employee :: Employee(string first, string last) { first=new string; last=new string; first=*firstname; last=*lastname; empCount++; }
Also, someone should point out to your teacher that those parameters should be const references rather than temporaries, and that using new/delete without RAII is just asking for trouble...