/in/foo.cc:21:1: error: 'queue' does not name a type
queue<tree *> q;//用来建树,代替递归
^~~~~
/in/foo.cc:22:1: error: 'queue' does not name a type
queue<tree *> topo;//把几点打入队列用来DP,由程序知后打入的是需要先DP的;
^~~~~
/in/foo.cc: In function 'void build_r(tree*&, node*)':
/in/foo.cc:53:2: error: 'q' was not declared in this scope
q.push(T);
^
/in/foo.cc:54:12: error: 'r' was not declared in this scope
build_r(T-r,p-next);
^
/in/foo.cc:54:15: error: invalid operands of types 'node*' and '<unresolved overloaded function type>' to binary 'operator-'
build_r(T-r,p-next);
~^~~~~
/in/foo.cc: In function 'void build()':
/in/foo.cc:60:2: error: 'q' was not declared in this scope
q.push(T);
^
/in/foo.cc:67:16: error: 'r' was not declared in this scope
u->l->l=u->l-r=0;
^
/in/foo.cc:68:5: error: 'l' was not declared in this scope
u-l>0>x=g[u->x]->v;
^
/in/foo.cc:68:9: error: 'x' was not declared in this scope
u-l>0>x=g[u->x]->v;
^
/in/foo.cc: In function 'void topodeal(tree*)':
/in/foo.cc:77:13: error: 'r' was not declared in this scope
topodeal(T-r);
^
/in/foo.cc:78:2: error: 'topo' was not declared in this scope
topo.push(T);
^~~~
/in/foo.cc: In function 'void dp(tree*)':
/in/foo.cc:81:8: error: 't' was not declared in this scope
int u=t->x;
^
/in/foo.cc:86:7: error: 'r' was not declared in this scope
if(T-r){
^
/in/foo.cc:87:7: error: redeclaration of 'int r'
int r=T->r->x;
^
/in/foo.cc:86:7: note: '<typeprefixerror>r' previously declared here
if(T-r){
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:101:14: error: 'topo' was not declared in this scope
for(tree *u=topo.front();!topo.empty();u=topo.front()) dp(u),topo.pop();
^~~~