I'm fairly new to c++, and I'm trying to implement a simple trie to store a lexicon of strings, using the std::map or other c++ standard library container classes. What I'd like to be able to do is use something like
typedef (map<char, type_node>)* type_node;
for which clang++ gives me the error ' use of undeclared identifier "type_node" '.
This as opposed to a self-referential structure, such as
typedef struct node {
int data;
struct node *next;
} Node;
Which works fine, somehow.
Is it possible to declare self-referential types without using a class or struct?
Why does the structure work and not the recursive alias type?
Is there a better way to do this?