#43136 - blaisef01 - Thu May 19, 2005 12:23 pm
Can any one tell me why this doesn't compile?
/*--------------------
C INCLUDES
--------------------*/
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include <math.h>
/*--------------------
CPP INCLUDES
--------------------*/
#include <string>
#include <list>
/*--------------------
NDS INCLUDES
--------------------*/
#include <NDS/NDS.h>
#include <NDS/DMA.h>
#include <NDS/ARM9/trig_lut.h>
#include <NDS/ARM9/math.h>
#include <NDS/ARM9/video.h>
#include <NDS/ARM9/videogl.h>
#include <NDS/registers_alt.h>
/*--------------------
CLASSES
--------------------*/
class Unit {
public:
std::string name;
public:
Unit() {}
};
template<class T>
class UnitList : public std::list<T> {
public:
void IteratorDontWork() {std::list<T>::iterator it = begin();}
};
/*--------------------
GLOBALS
--------------------*/
UnitList<Unit> TheList;
/*----------------------------------------------
Function: main()
Purpose: Main Program Loop Entry Point
Inputs: None
Outputs: Exit Flag
----------------------------------------------*/
int main(int argc, char ** argv)
{
return 0;
}
When I attempt to compile I get this error: expected `;' before "it"
I'm beyond confused, it's probably just a simple schoolboy error but still i'm baffled. I'm currently running off NDSEnv 2.3.0 and running out of ideas and sanity.
Cheers
/*--------------------
C INCLUDES
--------------------*/
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include <math.h>
/*--------------------
CPP INCLUDES
--------------------*/
#include <string>
#include <list>
/*--------------------
NDS INCLUDES
--------------------*/
#include <NDS/NDS.h>
#include <NDS/DMA.h>
#include <NDS/ARM9/trig_lut.h>
#include <NDS/ARM9/math.h>
#include <NDS/ARM9/video.h>
#include <NDS/ARM9/videogl.h>
#include <NDS/registers_alt.h>
/*--------------------
CLASSES
--------------------*/
class Unit {
public:
std::string name;
public:
Unit() {}
};
template<class T>
class UnitList : public std::list<T> {
public:
void IteratorDontWork() {std::list<T>::iterator it = begin();}
};
/*--------------------
GLOBALS
--------------------*/
UnitList<Unit> TheList;
/*----------------------------------------------
Function: main()
Purpose: Main Program Loop Entry Point
Inputs: None
Outputs: Exit Flag
----------------------------------------------*/
int main(int argc, char ** argv)
{
return 0;
}
When I attempt to compile I get this error: expected `;' before "it"
I'm beyond confused, it's probably just a simple schoolboy error but still i'm baffled. I'm currently running off NDSEnv 2.3.0 and running out of ideas and sanity.
Cheers