Please format the code you posted, by wrapping it in triple backticks. -> `
You can create function pointers in C/C++... Somehow it seems I will be doing the explaining after asking a question... Who cares. Here it is, void (*func_ptr)(int); This function pointer can then hold any function with return type void and an argument int. This can then be used to dynamically use functions in other functions or parts of the code. As all the info you need to ensure safe execution of code is output and input of a function.
Обсуждают сегодня