A quick question on how to dereference a map object pointer in c++, just reviewing. For example, lets say I only want the employeeID from employeePayroll: std::map<std::string, Employee *> *_employeePayroll; std::map<std::string, Employee *> _employeeID; _employeePayroll = &_employeeID; //To print the employeeID cout << static_cast<void*>_employeeID << "or" << employeePayroll->employeeID<< endl;
Aucun commentaire:
Enregistrer un commentaire