M
Matthias Matker
Hello!
I am sure you can help me with tis question:
I am writing a programme which uses severall classes, but I have a
"shared" file which contains definitions used by several classes.
---- define.h ----
const unsigned short TBufCharSize = 256;
typedef struct TEntry
{
unsigned short uAge;
bool bUseIt;
};
....
---
The methods of the classes use this definitions
myClass::doIt(TEntry e);
anotherClass:doThat(TEntry e);
Therefore I have to add #include "define.h" in the Files "myClass.h"
"anotherClass.h" and "main.cpp"
But the compilers causes an error: "TBufCharSize redefined, TEntry
redefined".
Can anyone tell me how to use "shared" definitions correctly?
Thanks, Merry Christmas...
I am sure you can help me with tis question:
I am writing a programme which uses severall classes, but I have a
"shared" file which contains definitions used by several classes.
---- define.h ----
const unsigned short TBufCharSize = 256;
typedef struct TEntry
{
unsigned short uAge;
bool bUseIt;
};
....
---
The methods of the classes use this definitions
myClass::doIt(TEntry e);
anotherClass:doThat(TEntry e);
Therefore I have to add #include "define.h" in the Files "myClass.h"
"anotherClass.h" and "main.cpp"
But the compilers causes an error: "TBufCharSize redefined, TEntry
redefined".
Can anyone tell me how to use "shared" definitions correctly?
Thanks, Merry Christmas...