I am new to C++. I use a Python dictionary to store the data previously, now I am working on C++. Does C++ also have a data structure like Python's dictionary?
My scenario is as follows,
We have 4 flows in the network and assign a route to each flow. Thus, in python we can:
dictFlowRoute = {"flow1":(1,2,3,4), #flow1 is sent by node 1 to node 4.
"flow2":(1,5,3,4),
"flow3":(1,2,5,3),
"flow4":(2,3,1,5)}
based on the given route (dictFlowRoute), we can know which streams are transmitted by each pair of nodes. For example, "flow1" and "flow3" are transmitted by node pair (1,2). In python, we can generate another dictionary to store these data,
dictNodePairwithFlow = { (1,2):("flow1","flow3"),
(2,3): ("flow1","flow4"),
(3,4): ("flow1","flow2"),
(1,5): ("flow2", "flow4"),
(5,3): ("flow2","flow3")}
Hence, in C++, how to present dictFlowRoute, and how to generate dictNodePairwithFlow according to the given dictFlowRoute?