I need to devise a program to hold information about library books. (Basically a representation of a DBMS)
I want to use the C++ <MAP> functionality to enable searching.
How do I make the second element of my <MAP> point at the class holding the data I need?
For Example:
Class Book containing RefNo,Title,Author,Category, ISBN, etc
Would hold RefNo as LHS of MAP, but what in RHS?
Class functions would be display which would display all details based on say Title.
So you'd use the map to find the index for the title in question and then the second element would define the class instance which would hold all the data needed to be displayed.
Anyway I hope you get the idea of what I am trying to do?
Any tips, advice, help much appreciated.
Regards
I want to use the C++ <MAP> functionality to enable searching.
How do I make the second element of my <MAP> point at the class holding the data I need?
For Example:
Class Book containing RefNo,Title,Author,Category, ISBN, etc
Would hold RefNo as LHS of MAP, but what in RHS?
Class functions would be display which would display all details based on say Title.
So you'd use the map to find the index for the title in question and then the second element would define the class instance which would hold all the data needed to be displayed.
Anyway I hope you get the idea of what I am trying to do?
Any tips, advice, help much appreciated.
Regards