I'm trying to create a class called "Employee" that holds two character arrays, "firstName" and "lastName".

class Employee
{
private:
char *firstName;
char *lastName;
float hourlyRate;
float weeklyPay;
public:
void setFirstName(char *);
char* getFirstName();
void setLastName(char *);
char* getLastName();
void setHourlyRate(float hr);
float getHourlyRate();
void computeWeeklyPay();
float getWeeklyPay();
Employee();
~Employee();
};
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:

Employee::Employee()
{
firstName = new char[];
lastName = new char[];
}
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.