#include <iostream>
#include<map>
#include<string>
#include<vector>
class Chip8{
private:
static void (Chip8::*table[16])(); //function pointer table
public:
void cycle();
void opcode0();
};
void (Chip8::*Chip8::table[16])() = {
&Chip8::opcode0,
};
void Chip8::opcode0()
{
std::cout<<"opcode0 called"<<std::endl;
}
void Chip8::cycle(){
std::cout<<"cycle called"<<std::endl;
(this->*table[0])();
}
int main()
{
Chip8 chip;
chip.cycle();
return 0;
}