Compile Error

/in/foo.cc:6:5: error: 'vector' does not name a type
     vector<Node*> sons;
     ^~~~~~
/in/foo.cc: In function 'void dfsFind(Node*, int, int*)':
/in/foo.cc:15:29: error: request for member 'sons' in 'node', which is of pointer type 'Node*' (maybe you meant to use '->' ?)
     for(int i = 0; i < node.sons.size(); i++) { //  错误 1 指针操作错误
                             ^~~~
/in/foo.cc:16:22: error: request for member 'sons' in 'node', which is of pointer type 'Node*' (maybe you meant to use '->' ?)
         dfsFind(node.sons[i], dep, counter);    //  错误 2 指针操作错误,深度控制不当
                      ^~~~
/in/foo.cc: In function 'int find(Node*, int)':
/in/foo.cc:27:14: error: declaration of 'int maxDep' shadows a parameter
     int max, maxDep;                      //  错误 4 未初始化、命名冲突
              ^~~~~~

信息

递交者
类型
递交
题目
P1012 谁的孙子最多
语言
C++
递交时间
2024-08-05 12:50:35
评测时间
2024-08-05 12:50:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes