Question

I have a structure of the following type

struct Node
    {
        int  word;       
        int   count;       
        unordered_map<Type, Node*> map;       

    }node;   

Is it safe to assume that sizeof(node) gives you the correct size of that node in C++? I am sure there will be padding in the structure but still will the sizeof take into consideration the correct size of the unordered_map.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top