/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 未初始化、命名冲突
^~~~~~