I have this structure based multimap and a vector for this structure:
typedef std::multimap<char, int> tr;
vector <tr> transitions;
I want to fill the array with values like:
0 0 a
0 1 a
1 1 b
1 2 c
1 3 c
which represent the transitions of an automaton, and i use a vector of std::multimap for the transitions. This assumes that each state corresponds to an integer. How I could do this?. I try:
for (j=0; j<numberTransitions;j++){
cin>> stateOrigin>>stateDestination>>transitionCharacter;
transitionsStates.insert(pair<char, int>(transitionCharacter, stateDestination));
transitions.push_back (transitionsStates);
}
But I'm not sure if it's correct. Any suggestions?