Click here to Skip to main content
15,905,914 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralScroll Bars in List control Pin
Prasanna_b_r3-Jun-03 1:21
Prasanna_b_r3-Jun-03 1:21 
GeneralRe: Scroll Bars in List control Pin
Rage3-Jun-03 3:12
professionalRage3-Jun-03 3:12 
GeneralRe: Scroll Bars in List control Pin
Prasanna_b_r3-Jun-03 19:35
Prasanna_b_r3-Jun-03 19:35 
GeneralGrid control Pin
AlenCk3-Jun-03 1:08
AlenCk3-Jun-03 1:08 
GeneralRe: Grid control Pin
Anonymous3-Jun-03 3:23
Anonymous3-Jun-03 3:23 
GeneralRe: Grid control Pin
Rage3-Jun-03 3:29
professionalRage3-Jun-03 3:29 
GeneralRe: Grid control Pin
AlenCk3-Jun-03 20:33
AlenCk3-Jun-03 20:33 
GeneralProblem with templates<> and classes Pin
Zibar2-Jun-03 23:53
sussZibar2-Jun-03 23:53 
Problem with templates<> and classes


I have this kind of class (first of all - I use VC++.NET)

class XMLParser
{
struct Scene
{
LinkedList< SceneObject > objectList;
}

struct SceneObject
{
}

LinkedList< Scene > sceneList;

XMLParser
~XMLParser();

//
static void StartElementHandler(void * data,
const char * element,
const char ** attribute);
static void EndElementHandler( void *data,
const char *el );
}

I'm using the expat library for XML parsing. This class should parse an .xml file and create a list of scenes.
XMLParser constructor initializes the expat XML parser and the StartElementHandler and EndElementHandler are callbacks that handle the parsing needed by expat.

The problem is the templated LinkeList class. I want to "new LinkedList< Scene >()". I can't do it inside the class decalration and I can't do it outside of the class declaration. In the first case I get a compiler error (obviously) and in the second one a linker error.

If I do:
XMLMovieParser::sceneList = new LinkedList< Scene >();
I get C2512 no appropriate default constructor available
and C2955 use of class template requires template list

If I do inside the constructor:
sceneList = new LinkedList< Scene >();
I get an unresolved external symbol errors: LNK2001 and LNK2019

etc.

the full class is too long to post
GeneralRe: Problem with templates&lt;&gt; and classes Pin
Joaquín M López Muñoz3-Jun-03 0:27
Joaquín M López Muñoz3-Jun-03 0:27 
GeneralRe: Problem with templates&lt;&gt; and classes Pin
Zibar3-Jun-03 0:30
sussZibar3-Jun-03 0:30 
GeneralCopy/paste (other font) into RichEdit Pin
Michael Pauli2-Jun-03 23:38
Michael Pauli2-Jun-03 23:38 
GeneralRe: Copy/paste (other font) into RichEdit Pin
Rage3-Jun-03 3:30
professionalRage3-Jun-03 3:30 
GeneralRe: Copy/paste (other font) into RichEdit Pin
Michael Pauli4-Jun-03 0:15
Michael Pauli4-Jun-03 0:15 
GeneralPainting on a static Pin
Zizilamoroso2-Jun-03 23:28
Zizilamoroso2-Jun-03 23:28 
GeneralRe: Painting on a static Pin
Rage3-Jun-03 3:08
professionalRage3-Jun-03 3:08 
GeneralDial up connections, please help Pin
Jump_Around2-Jun-03 23:03
Jump_Around2-Jun-03 23:03 
QuestionHow can I ignore the newline character when using fgets() Pin
jcpooh2-Jun-03 22:33
jcpooh2-Jun-03 22:33 
AnswerRe: How can I ignore the newline character when using fgets() Pin
David Crow3-Jun-03 2:52
David Crow3-Jun-03 2:52 
General!!illegal operation when clicking the edit box of CTreeView Pin
black19212-Jun-03 21:54
black19212-Jun-03 21:54 
GeneralRe: !!illegal operation when clicking the edit box of CTreeView Pin
black19212-Jun-03 21:56
black19212-Jun-03 21:56 
GeneralHelp !!! How to edit, append, read data from an access dbase file using CRecordset class Pin
mhar2-Jun-03 21:52
professionalmhar2-Jun-03 21:52 
GeneralRe: Help !!! How to edit, append, read data from an access dbase file using CRecordset class Pin
David Crow3-Jun-03 3:03
David Crow3-Jun-03 3:03 
GeneralRe: Help !!! How to edit, append, read data from an access dbase file using CRecordset class Pin
mhar3-Jun-03 14:21
professionalmhar3-Jun-03 14:21 
GeneralRe: Help !!! How to edit, append, read data from an access dbase file using CRecordset class Pin
David Crow4-Jun-03 2:50
David Crow4-Jun-03 2:50 
GeneralDLL as an extra process Pin
AnTri2-Jun-03 21:51
AnTri2-Jun-03 21:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.