Just one Single error

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 :

to access the data member of class from an object we use dot (,)
-> is used to access the data member of class from pointer of object

so here use . not ->

if you want to ask something about this feel free to ask
i hope this helps
if yes show your response with :heart: and don’t forgot to mark doubt as resolved