CList, POSITION and template pointers
-
How do you declare a pointer to a template? I'm trying to make a clone of the CList class, and cannot figure out how they have defined the POSITION type. in list.h (search for 'clist' in the MSDN library), it is defined thusly: #define POSITION CNode* This works for all class methods of my CList and CNode, however when I try and use it in code I get a "TYPE undeclared" error. Suggestions? - Xavier
-
How do you declare a pointer to a template? I'm trying to make a clone of the CList class, and cannot figure out how they have defined the POSITION type. in list.h (search for 'clist' in the MSDN library), it is defined thusly: #define POSITION CNode* This works for all class methods of my CList and CNode, however when I try and use it in code I get a "TYPE undeclared" error. Suggestions? - Xavier
I hope I am answering this before CG. :) Why do you have to reinvent the wheel? Use
std::list
Best regards, Alexandru Savescu P.S. Interested in art? Visit this! -
I hope I am answering this before CG. :) Why do you have to reinvent the wheel? Use
std::list
Best regards, Alexandru Savescu P.S. Interested in art? Visit this!Learning purposes, although I haven't looked at std::list, maybe that will shed some light. Thanks. - Xavier