Ok, the basic programming problem is this. I have a file filled with words. Each word has between 1 and a theoretically infinite number of tags that describe it.
Something like:
Hello : Tags: Greeting, Polite
Now I have a class, Foo, that wants a word given that it knows the tags that the word is associated with. The function GetWord() takes the tags as an argument and returns the word.
So, the function opens the words file and must find a word that matches every tag it's given, including words that have extra tags associated with them.
What would be the best way to implement this function. I was thinking something alone the lines of an unordered_map that takes a variable number of keys and returns everything that has those keys but also ones that have those keys and some extra ones, so long as it matches all the given keys.
If this makes any sense at all I could use some help.