How can i initialize an array (maxsize: 4), (type: class Employee), so as i can get for 4 people their names, ages, etc. ?
Code:
class Employee{
private:
string AFM;
string name;
string surname;
int age;
float salary;
public:
Employee(); // Constructor!
int read();
void show();
class Employee A[4];
};
Also, as you can see i am using a constructor here(it' s my first time) but i do not know what to write in main... My first thought was something like this, but i am sure that it is wrong(a, b c, d are the 4 people!)!
What shall i write here to finally create the array i wanted ?
Code:
int main(){
Employee a, b, c, d;
a.read();
b.read();
c.read();
d.read();
return 0;
}
thank you all!