1234567891011121314151617
class employee{ string name; int id; double salary; public: employee(string name, int id, double salary) : name(name), id(id), salary(salary) {} string getName() {return name;} int getID() {return id;} double getSalary() {return salary;} }; int main(){ vector<employee> employees; employees.push_back(employee("John", 117, 30000)); cout << employees[0].getName() <<" "<< employees[0].getID() <<" "<< employees[0].getSalary()<<endl; employees.erase (employees.begin()); }
employee