I have a piece of code to be understood. But I’m lost in one point.
Here is the code:
typedef unordered_map <string, TimeStampSet *> HIEMap;
typedef set <TimeStamp> TimeStampSet;
struct HostInfo {
HostActivity *hostActivity;
HIEMap *hieMapArr;
};
typedef unordered_map <uint32_t, HostInfo *> HostInfoMap;
HIEMap::iterator hieMapIt;
void method(...){
for (hieMapIt = hostInfoIt -> second -> hieMapArr -> begin();
hieMapIt != hostInfoIt -> second -> hieMapArr -> end();
hieMapIt = nextMapIt)
{
if (hieMapIt -> second == NULL) {
//what does *hieMapIt -> second* returns?
}
}
}
What does hieMapIt -> second return? I’ m a bit lost.
This is not all code, there are initializations and so on. But I dont put all the code here.
Thanks,
It will return a
TimeStampSet *. That is, the second part of the unordered_map (string , TimeStampSet *) “pair”.