Gah... I had a big reply and it got swallowed. Grrr.
Anyway...
You have an incomplete understanding of pointers and memory management. It would be much,
much simpler for you to just use strings instead of trying to do the dynamic allocation yourself. I illustrate how to use strings in your other thread here:
http://www.cplusplus.com/forum/beginner/122432/#msg667187
Is there some reason you can't use strings? Like is this a school assignment or something?
If that's the case, you have quite a number of problems with what you're doing now:
#1) Your constructors allocate a new buffer for the name, but they do not initialize the buffer, so the employee's name will always be a bunch of random garbage characters.
#2) Your constructor effectively "throws away" any name that gets passed to it, by replacing the passed in pointer with a pointer to a dynamically allocated buffer.
#3) Since you have dynamic allocation, you need to overload the copy constructor and assignment operator. If you fail to do this, whenever an Employee is copied or reassigned, you'll have multiple objects owning the same buffer, and buffers will be deleted multiple times (bad -- possibly causing a program crash).
But again... all of these are non-issues if you just use strings.