Hello, I have a stupid question, but I couldn't find the answer, how do I call a function by it's number at the end of the name, which is a variable number? (Without declaring a new array)
Below I have several functions: model1, model2, model3 ..., and I wand to make a random function that is calling the other functions randomly.
Why don't you just simply assign random values to timp1 and timp2?
timp1 = random(0,6);
timp2 = random(0,6);
If you are just looking for the method for the random function call, I think you have to declare an array of function pointers (each pointing to one of the desired function) and then select an element randomly from this array.
You can't do any manipulation of function names at runtime - they no longer exist in the code. Pointers to functions could help as @amazed suggested. Otherwise, just do it the long way with a switch.