Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CList problems.

Posted on 1999-06-28
2
Medium Priority
?
207 Views
Last Modified: 2013-11-20
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.
0
Comment
Question by:jguerin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
naveenkohli earned 400 total points
ID: 1308236
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.
0
 

Author Comment

by:jguerin
ID: 1308237
-_-... whoops, missed that one. Thanks.
0

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question