CList problems.

I don't know why, but whenever I try to compile a program with a CList class in it (the MFC linked list-ish class, not the box control) I get errors up the wazoo.
Here's the gist of what I'm doing.

struct ScriptStruct
  char cmd, opt[4];
CList<ScriptStruct, ScriptStruct&> myScript;

For some reason I get errors all over the place just by adding that CList<> myScript line. It actually seems like it's not recognizing it as a templated class because it complains about the '<' and semi colons and everything, even though the syntax is correct (yes, it is correct).
I'm throwing this in the (PRJ)Doc class of my project if it is of any consolation. Thanks.
Who is Participating?
naveenkohliConnect With a Mentor Commented:
You forgot to include the header file for collection object templates

#include <afxtempl.h>

Add it your header file or if you are going to use these template objects quite often in your project, put in your stdafx.h file.
jguerinAuthor Commented:
-_-... whoops, missed that one. Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.