I am in the middle of writing a program that has a function that performs another function:
int executePuzzle(int input) { switch (input) { case 1: puzzle1();break; case 2: puzzle2();break; default:break; } }
However, it might be more efficient to just have something like:
int puzzle[2] = {puzzle1(),puzzle2()};
Then call puzzle0; I was wondering how this will be done.
source share