Different Kind Of Catalog Infos Evaulating (Desing Idea)

I have a 3 different .txt file(book.txt,movie.txt,music.txt).
I have to use C++ STL, Class Templates.
My problem is I dont know where i should start.

Music Catalog
<title> <artist> <year> <genre>
Book Catalog
<title> <authors> <year> <tags>

All catalog have different fields.

My operations are sort & search.
sort <field> // sort authors
search <string> in <field> // search "Metalica" in artists

Feel free to help :)
My problem is I dont know where i should start.


All catalog have different fields.

Templates? You've only shown two of your three catalogs, so only a guess.


My operations are sort & search.

Again you're not giving us much information, you only show one search condition for one catalog. Are you trying to sort on only one field for each catalog? Or do you want to be able to search on multiple fields for each catalog. But again templates will probably be the key.

The same with your search. You need to specify what fields you need to search. And again templates will probably be the key.

You'll probably want to use std::vector, templates, std::sort, std::find, and the like.

Topic archived. No new replies allowed.