Original Post
Well at least I think it''s odd.
I have two classes:
TDSettings and TDS_POS
TDSettings.h looks like this
TDS_POS.h looks like this:
When compiling TDSettings.h, Visual C++ 6 gives me the errors on GetKeyByPos and GetCatByPos, telling me that it did not expect TDS_POS as an identifier. Putting a simple data type like int compiles fine. What am I doing wrong? :/
Exact Errors:
#include "TDS_POS.h"
// other includes
class TDSettings
{
// lots of snipped stuff
public:
int GetKeyByPos( TDS_POS& Pos, char *KeyBuffer );
int GetCatByPos( TDS_POS& Pos, char *CatBuffer );
// lots more snipped stuff
};
|
#include "TDSettings.h"
//snippage
class TDS_POS
{
friend class TDSettings;
// snip
public:
TDS_POS();
virtual ~TDS_POS();
void SetType( char NewType, TDSettings& Settings );
int SetCat ( const char *Cat, TDSettings& Settings );
int SetCat ( TDS_POS& Cat, TDSettings& Settings );
// note how TDS_POS& works just fine here
unsigned int NumEntries() { return TableSize; };
};
|
tdsettings.h(111) : error C2061: syntax error : identifier ''TDS_POS'' tdsettings.h(112) : error C2061: syntax error : identifier ''TDS_POS''