- Nov 29, 2005
- 2,411
- 0
- 0
Simple version:
I want to map a bunch of pointers to a vector of integers.
You'd think something like this would work:
vector<int> lotsOfInts;
map<thingee *, nodes> iLoveMaps;
But either it doesn't, or I'm retarded.
Complicated Version:
I want to map a bunch of symbols to the nodes in a DFG that use that symbol. I could so a multimap, and have an entry for each mapping (i.e. if symbol x appears in nodes 2,3,6, have a mapping x->2, x->3 and x->6...but it seems more elegant to have x-> <2,3,6>)
I can use integers because they'll represent the node ID in the graph, saving me from using the actual pointers and having to dereference them. And yes, I know I should be using boost for the graph. I'm a bad person. I admit it.
Any help? Thanks!
I want to map a bunch of pointers to a vector of integers.
You'd think something like this would work:
vector<int> lotsOfInts;
map<thingee *, nodes> iLoveMaps;
But either it doesn't, or I'm retarded.
Complicated Version:
I want to map a bunch of symbols to the nodes in a DFG that use that symbol. I could so a multimap, and have an entry for each mapping (i.e. if symbol x appears in nodes 2,3,6, have a mapping x->2, x->3 and x->6...but it seems more elegant to have x-> <2,3,6>)
I can use integers because they'll represent the node ID in the graph, saving me from using the actual pointers and having to dereference them. And yes, I know I should be using boost for the graph. I'm a bad person. I admit it.
Any help? Thanks!
