composite class and sequence of constructors use in composite class?
#include <iostream>
using namespace std;
class Employee
{
private:
int age;
string name;
public:
Employee(int, string) {
this->age = age;
this->name = name;
}
~Employee();
string getName() {
return this->name;
}
int getAge() {
return this->age;
}
};
Comments
Leave a comment