0_0_31849285_23193.cpp:9:1: error: 'Node' does not name a type
Node node[max_num];
^
0_0_31849285_23193.cpp: In function 'void init()':
0_0_31849285_23193.cpp:15:9: error: 'node' was not declared in this scope
node[i].conn = 0;//入度初始化为0
^
0_0_31849285_23193.cpp: In function 'int find_root(int)':
0_0_31849285_23193.cpp:23:8: error: 'node' was not declared in this scope
if(node[a].root!=a)
^
0_0_31849285_23193.cpp:25:12: error: 'node' was not declared in this scope
return node[a].root;
^
0_0_31849285_23193.cpp: In function 'void union_set(int, int)':
0_0_31849285_23193.cpp:34:5: error: 'node' was not declared in this scope
node[b].root=a;//把b的根赋为a的根,此时a已经是根,num==root
^
0_0_31849285_23193.cpp: In function 'int main()':
0_0_31849285_23193.cpp:52:20: error: 'node' was not declared in this scope
if(node[j].num && find_root(j)==j)
^
0_0_31849285_23193.cpp:54:20: error: 'node' was not declared in this scope
if(node[j].conn>1)//如果出现某个节点的入度超过1,不是树
^
0_0_31849285_23193.cpp:73:13: error: 'node' was not declared in this scope
node[m].num = 1;
^
|