printer.cpp: In function 'void insertTrie(Node*, std::string&, bool)':
printer.cpp:37:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
37 | while (idx < str.length()) {
| ~~~~^~~~~~~~~~~~~~
printer.cpp:41:53: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
41 | curNode->child[childIdx] = new Node(idx == str.length() - 1, false);
| ~~~~^~~~~~~~~~~~~~~~~~~
printer.cpp: In function 'int main()':
printer.cpp:88:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
88 | if (maxLen < arr[i].length()) {
| ~~~~~~~^~~~~~~~~~~~~~~~~
printer.cpp:93:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::__cxx11::basic_string<char> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
93 | for (int i = 0; i < arr.size(); i++) {
| ~~^~~~~~~~~~~~
printer.cpp:98:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
98 | for (int i = 0; i < out.size(); i++) {
| ~~^~~~~~~~~~~~
printer.cpp:94:19: warning: 'longest' may be used uninitialized in this function [-Wmaybe-uninitialized]
94 | insertTrie(root, arr[i], i == longest);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~