I’m wondering if there is a more appropriate structure for my needs.
I need to have a dictionary or strings (words). All I need to know is if a given word is in the dictionary.
It seems like a waste of memory to make a map of string,string. Is there a better way?
Thanks
Use a
std::set<string>. You can usestd::set::findto check whether a word exists or not.