How to index and query STL map containers by multiple keys?

前端 未结 5 720
悲哀的现实
悲哀的现实 2020-12-16 14:20

I came across one requirement where the record is stored as

Name :  Employee_Id  :  Address

where Name and Employee_Id are supposed to be k

5条回答
  •  再見小時候
    2020-12-16 14:51

    If EmployeeID is the unique identifier, why use other keys? I would use EmployeeID as the internal key everywhere, and have other mappings from external/human readable IDs (such as Name) to it.

提交回复
热议问题