0

I have a set of tokens declared as such:

std::set<std::string> tokens;

To which I insert a number of ordered token strings. Now I need to associate each token in the set with another unique set of string tokens. In C I would just be keeping an array of tokens and an array of arrays of tokens, which would share the same first dimension index. What I'm wondering is what the "C++ version" of this type of data structure is and how it's implemented.

tokens = {"list1", "list2"}
sets = {"list1": {"item1", "item2", "item3"}, "list2": {"item1", "item2"}}

is pretty much what I'm going for, the end-goal is to perform set operations on tokens taken from std input.

4

2 に答える 2