printer.cpp: In function 'void traverse(int)':
printer.cpp:26:19: error: request for member 'nex' in 'tries[curr]', which is of pointer type 'Trie*' (maybe you meant to use '->' ?)
26 | if (tries[curr].nex[c] != -1) {
| ^~~
printer.cpp:28:25: error: request for member 'nex' in 'tries[curr]', which is of pointer type 'Trie*' (maybe you meant to use '->' ?)
28 | traverse(tries[curr].nex[c]);
| ^~~
printer.cpp:33:18: error: request for member 'end' in 'tries[curr]', which is of pointer type 'Trie*' (maybe you meant to use '->' ?)
33 | if (tries[curr].end) {
| ^~~
printer.cpp: In function 'int main()':
printer.cpp:51:20: error: request for member 'nex' in 'tries[curr]', which is of pointer type 'Trie*' (maybe you meant to use '->' ?)
51 | if (tries[curr].nex[c] != -1) { // prefix recorded previously
| ^~~
printer.cpp:52:24: error: request for member 'nex' in 'tries[curr]', which is of pointer type 'Trie*' (maybe you meant to use '->' ?)
52 | curr = tries[curr].nex[c];
| ^~~
printer.cpp:55:17: error: request for member 'nex' in 'tries[curr]', which is of pointer type 'Trie*' (maybe you meant to use '->' ?)
55 | tries[curr].nex[c] = index;
| ^~~
printer.cpp:56:18: error: request for member 'prev' in 'tries[index]', which is of pointer type 'Trie*' (maybe you meant to use '->' ?)
56 | tries[index].prev = curr;
| ^~~~
printer.cpp:62:15: error: request for member 'end' in 'tries[curr]', which is of pointer type 'Trie*' (maybe you meant to use '->' ?)
62 | tries[curr].end = true;
| ^~~