regions.cpp: In function 'void dfs2(int, std::vector<node>&)':
regions.cpp:24:20: error: too few arguments to function 'void dfs(int, std::vector<node>&, int&)'
24 | dfs(i, tree);
| ^
regions.cpp:9:6: note: declared here
9 | void dfs(int head, vector<node> &tree, int &c){
| ^~~
regions.cpp:26:24: error: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'struct node'} has no member named 'arr'
26 | tree[head].arr[j] += tree[i].arr[j];
| ^~~
regions.cpp:26:42: error: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'struct node'} has no member named 'arr'
26 | tree[head].arr[j] += tree[i].arr[j];
| ^~~
regions.cpp:29:16: error: '__gnu_cxx::__alloc_traits<std::allocator<node>, node>::value_type' {aka 'struct node'} has no member named 'arr'
29 | tree[head].arr[tree[head].reg]++;
| ^~~
regions.cpp: In function 'int main()':
regions.cpp:50:17: error: invalid initialization of reference of type 'std::vector<node>&' from expression of type 'std::vector<node2>'
50 | dfs2(0, tree);
| ^~~~
regions.cpp:22:35: note: in passing argument 2 of 'void dfs2(int, std::vector<node>&)'
22 | void dfs2(int head, vector<node> &tree){
| ~~~~~~~~~~~~~~^~~~
regions.cpp:91:17: warning: unused variable 'last' [-Wunused-variable]
91 | int last = 0, lid = 0, cc = 0;
| ^~~~
regions.cpp:91:27: warning: unused variable 'lid' [-Wunused-variable]
91 | int last = 0, lid = 0, cc = 0;
| ^~~