: : Hi,
: : I need to get a large array of function pointers that have a type defined:
: :
: : typedef int (*Cxxx_OPCODE)(struct _xxx* cpu, unsigned char opcode, unsigned char* cycle);
: :
: : Cxxx_OPCODE opcodes[256];
: :
;
: :
: : The compiler does not see any problem with it. But when I put the array into a structure:
: :
: :
: : typedef struct _xxx{
: : ...
: : struct _Cxxx_MEMORY* mem;
: : Cxxx_OPCODE opcodes[256];
: : Cxxx_TIMING timing[256];
: : } xxx;
: :
: : I get an error: xxx.h:59: parse error before "Cxxx_TIMING"
: : When I replace "Cxxx_OPCODE opcodes[256];" with "Cxxx_OPCODE** opcodes;"
: : it works fine.
: :
: :
: : Can anybody know what can be wrong?
: :
: : Thanks.
: Just curious, what kind of cpu are you trying to emulate?
:
I'm making a big emulator that can handle some of my strange electronic ideas (like emulating a circuit with 2x 6502 and for example a Z80 + a lot of strange memory mapped devices).