D
DanielEKFA
Hmm... Not sure how to crack this one. I have this code:
typedef bool execFunctionType(const commandDataType&);
struct commandDataType
{
SymbolSequence Sequence;
string command;
execFunctionType* executer;
};
As you can see, the execFunctionType takes as an argument a
commandDataType struct which contains a pointer to a function of type
execFunctionType. Logically this is okay (at least according to my
logic , yet the thing won't compile because the struct needs the
typedef to be defined before it to make sense of the execFunctionType,
and the typedef needs the struct to be defined before it to make sense
of the struct...
What to do?
TIA,
Daniel
typedef bool execFunctionType(const commandDataType&);
struct commandDataType
{
SymbolSequence Sequence;
string command;
execFunctionType* executer;
};
As you can see, the execFunctionType takes as an argument a
commandDataType struct which contains a pointer to a function of type
execFunctionType. Logically this is okay (at least according to my
logic , yet the thing won't compile because the struct needs the
typedef to be defined before it to make sense of the execFunctionType,
and the typedef needs the struct to be defined before it to make sense
of the struct...
What to do?
TIA,
Daniel