Line 2: error: 'draw0' undeclared here (not in a function)
Line 2: error: 'draw1' undeclared here (not in a function)
Line 2: error: 'draw2' undeclared here (not in a function)
You didn't call the function. You may try : cout << (func[0])() << endl;
Edit : If you don't call it, std::cout only prints the address of a function alone. If you decide to call the function, you should specify a return value for your draw functions or otherwise it won't work. std::cout cannot output void return value after all
> Yeah, that's why they were void first but since I can't call them without a return value I changed to int
You can simply call a function anywhere (inside or outside a cout command). Calling a func inside cout requires a return value other than void though, but I think it is safe to just remove the cout part and just call the function for good.
It's working now, thanks a lot. I'm making a game and I wanna add a new "frame" of a picture after every input and switching through functions seemed the easiest to do.