Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stupid Problem

Status
Not open for further replies.

BenLange

Programmer
Dec 16, 2000
5
0
0
US
I'm attempting to create a CList object in a C++ class.
I've created an MFC AppWizard (exe) project.
The declaration code looks like:
CList<int,int> test;
For some reason I'm getting the error codes back:
Any thoughts or suggestions on this would be appreciated. I'm fairly certain there is a global setting where I don't have MFC configured properly but anything is possible.
--------------------Configuration: BCXProjectSinker - Win32 Debug--------------------
Compiling...
BCXProjectSinker.cpp
h:\dev\work\bioconx\bcxprojectsinker\bcxprojectsinkerdlg.h(31) : error C2143: syntax error : missing ';' before '<'
h:\dev\work\bioconx\bcxprojectsinker\bcxprojectsinkerdlg.h(31) : error C2501: 'CList' : missing storage-class or type specifiers
h:\dev\work\bioconx\bcxprojectsinker\bcxprojectsinkerdlg.h(31) : error C2059: syntax error : '<'
h:\dev\work\bioconx\bcxprojectsinker\bcxprojectsinkerdlg.h(31) : error C2238: unexpected token(s) preceding ';'
BCXProjectSinkerDlg.cpp
h:\dev\work\bioconx\bcxprojectsinker\bcxprojectsinkerdlg.h(31) : error C2143: syntax error : missing ';' before '<'
h:\dev\work\bioconx\bcxprojectsinker\bcxprojectsinkerdlg.h(31) : error C2501: 'CList' : missing storage-class or type specifiers
h:\dev\work\bioconx\bcxprojectsinker\bcxprojectsinkerdlg.h(31) : error C2059: syntax error : '<'
h:\dev\work\bioconx\bcxprojectsinker\bcxprojectsinkerdlg.h(31) : error C2238: unexpected token(s) preceding ';'
Generating Code...
Error executing cl.exe.
Creating browse info file...

BCXProjectSinker.exe - 8 error(s), 0 warning(s)
 
Please double check to make sure that you have afxtempl.h included. You might want to consider putting the line

#include <afxtempl.h>

in StdAfx.h.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top