That "next" pointer makes me *very* suspicious. Are you building your own linked list? Don't do that; the standard library already provides a perfectly good one, std::list.
Although, if you're going to be doing all your lookup by searching for the "name", as EasilyConfused is guessing, then you instead want std::map. That is a data container that actually implements those semantics directly (lookup by a 'key'), and will provide faster searches than are possible with a linked list (because it internally sorts the data and can find the item by binary search; you *could* binary-search a doubly-linked list, but it isn't any faster than sequential search on a doubly-linked list).
And oh, yeah. std::string, and initializer lists. I don't know what language you've been using, but welcome to C++.
Basically, what EasilyConfused said. Except that you don't even need to define a "value type" for something this simple, because again, the standard library provides:
typedef std::pair<std::string, int> ValueType;// That hard-wires the field names, because there's no way you could specify// them via the template. .first replaces .Value; .second replaces .Flags .// But it saves you all that class creation work :)typedef std::map<std::string, ValueType> ValueTable;ValueTable Vars;void f() { Vars["a"] = ValueType("hello", 23); cout << Vars["a"].first;}
There, isn't
that much better, cleaner, easier? ;)