I am getting only one single error in the implementation of this problem Unique Prefix…
source.cpp: In function ‘std::string prefix(std::string, Trie)’:
source.cpp:51:16: error: base operand of ‘->’ has non-pointer type ‘Trie’
51 | node* root = t->root;
| ^~
the link of my code :