struct Node{
int ID, power, parent;
vector<int> connectedNodes;
Node(int ID_arg, int power_arg){
ID = ID_arg;
power = power_arg;
parent = -1;
}
};
struct Graph{
int rootID;
map<int, Node> nodes;
map<int,int> subtreeSizes;
Graph(){
rootID = 1;
nodes[1] = new Node(1,0);
}
};
I must be having a serious lapse right now because I have no idea what's wrong. It isn't liking the way I am putting the node in the node map.