Let's say I have a struct defined as such:
<hr>
typedef struct _TOKEN
{
struct _TOKEN *pNext; //Points to the next node in this list
struct _TOKEN *pPrev; //Points to the previous node in this list
int type;
int value;
} TOKEN;
<hr>
...and a template class called "list." (different from an STL list). Why can I do "list<int> list_of_ints;" but not "list<TOKEN> list_of_tokens;"?
edit: The message that g++ gives me is: "main.cpp:25: template-argument `main()::TOKEN' uses local type `main()::TOKEN'".
[This message was edited by ctkrohn on March 15, 2002 at 14:23.]
<hr>
typedef struct _TOKEN
{
struct _TOKEN *pNext; //Points to the next node in this list
struct _TOKEN *pPrev; //Points to the previous node in this list
int type;
int value;
} TOKEN;
<hr>
...and a template class called "list." (different from an STL list). Why can I do "list<int> list_of_ints;" but not "list<TOKEN> list_of_tokens;"?
edit: The message that g++ gives me is: "main.cpp:25: template-argument `main()::TOKEN' uses local type `main()::TOKEN'".
[This message was edited by ctkrohn on March 15, 2002 at 14:23.]