I am trying to initialize a vector of struct opcodeTable with 2 values as follow:
struct opcodeTableE {
uint16_t opcode;
uint16_t mask;
void (chipCpu::*instruction)(uint16_t);
};
std::vector<opcodeTableE> opcodetable{
{0x00E0, 0xFFFF, chipCpu::clearScreen},
{0x00EE, 0xFFFF, chipCpu::returnFromSub}
};
But I get the following error:
no instance of constructor "std::vector<_Tp, _Alloc>::vector [with _Tp=chipCpu::opcodeTableE, _Alloc=std::allocator<chipCpu::opcodeTableE>]" matches the argument list -- argument types are: ({...}, {...})
NOTE: I am on C++14