I'm trying to create a class called "Employee" that holds two character arrays, "firstName" and "lastName".
I need to allocate memory for the firstName and lastName fields in the constructor. I keep getting a compiler error when I try the following code:class Employee
void setFirstName(char *);
void setLastName(char *);
void setHourlyRate(float hr);
If I specify a size in the  braces, it compiles correctly, but that seems to be defeating the purpose of dynamically allocating memory. Is there any way to get this to work without putting in an array size? None of the books or online tutorials I've seen, give any examples that use character arrays. Any help would be appreciated.Employee::Employee()
firstName = new char;
lastName = new char;