foo.cc: In function 'void prePrint(node*)':
foo.cc:24:5: error: 'cout' was not declared in this scope
cout << root->v;
^~~~
foo.cc:24:5: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:75:0,
from foo.cc:1:
/usr/include/c++/7/iostream:61:18: note: 'std::cout'
extern ostream cout; /// Linked to standard output
^~~~
foo.cc: In function 'int main()':
foo.cc:36:38: warning: array subscript has type 'char' [-Wchar-subscripts]
in_nodes[len++] = tmp_nodes[c] = tmp;
^
foo.cc:40:39: warning: array subscript has type 'char' [-Wchar-subscripts]
pos_nodes[len++] = tmp_nodes[c];
^