Oh, just saw that you were looking for a Cpp solution.
Hello Sheen, Perl could solve this problem with code like that below. Notice the $trie, (pronounced 'try'), variable. Starting with perl 5.10 I...
Separate names with a comma.