0_0_37446674_31673.cpp: In function 'int main()':
0_0_37446674_31673.cpp:65:45: error: invalid initialization of non-const reference of type 'std::string& {aka std::basic_string<char>&}' from an rvalue of type 'std::basic_string<char>'
insert(root, s.substr(j, len), i);
^
0_0_37446674_31673.cpp:16:6: note: in passing argument 2 of 'void insert(trie*, std::string&, int)'
void insert(trie *rt, string &s, int val) {
^
|