Why is the type of employees[0].position[5] a char instead of a string? I got this wrong on a test, and I can't figure out why... Appreciate your help.
struct Name
{
string firstName;
char middleInitial;
string lastName;
};
class EmployeeInfo
{
Name name;
int age;
int id;
string position;
public:
Name getName() { return name; }
};
EmployeeInfo employees[100];
Aucun commentaire:
Enregistrer un commentaire