problem with passing a variable though the class constructor

I am having trouble getting the second constructor right for the class i created called employee. At the bottom i included where i call the function in int main
().

class Employee
{
public:
Employee()
{
char person[]="None";
strcpy (name, person);
idNum=1000;
salary=0;
};
Employee(const char x*, int id, double sal)
{
strcpy (name, x*);
idNum=id;
salary=sal;
};


void printEmp()
{
cout<<"Employee: ";
for (int x=0;x<26;x++)
{
cout<<name[x];
}
cout<<"ID: "<<idNum;
cout<<"Salary: "<<salary;
};
void increaseSalary( double more)
{
if (more>0)
{
salary=salary+more;
}
else
{
cout<<"Error: the salary cannot be increased";
}
};

void setIDnum( int newIDnum)
{
if (newIDnum<1000||newIDnum>9999999)
{
cout<<"Error: the new identification number is invalid. It will be ste to 1000";
idNum=1000;
}
else
{
idNum=newIDnum;
}
};
void setSalary( double newSalary)
{
if(newSalary<=0)
{
cout<<"Error: the passed in salary is invalid. The salary will be set to 0.00";
salary=0.00;
}
else
{
salary=newSalary;
}
};

int getIDnum()
{
return idNum;
};
double getSalary()
{
return salary;
};

private:
char name[25];
int idNum;
double salary;
};



int main()
{
Employee e1= Employee( "Matthew Lyon", 1704663, 678367732.40);
Hey! Please put code in code tags
You have put the asterisk on the right side of the variable name when it should be on the left side.
Topic archived. No new replies allowed.