Quiero que std :: vector contenga algunas funciones, y que se le puedan agregar más funciones en tiempo real. Todas las funciones tendrán un prototipo como este:std :: vector de funciones
nombre de vacío (evento SDL_Event *);
Sé cómo hacer una serie de funciones, pero ¿cómo hago un estándar :: de funciones? Intenté esto:
std::vector<(*)(SDL_Event *)> functions;
std::vector<(*f)(SDL_Event *)> functions;
std::vector<void> functions;
std::vector<void*> functions;
Pero ninguno de ellos funcionó. Por favor ayuda
gracias, esta funcionó perfectamente! –