I wrote a number of functions or as they are called in my code "Scenes", and I want one to be called randomly at a time. I tried to make an array of functions so that I can generate a random number and that will decide the scene to be called. I made a variable "myfunctions" which is supposed to be an array of all the functions. I tried to make it a pointer and a void function and also tried making it an int, but I get the error "'myfunctions does not have a name type'". Is there a better way to make an array of functions and why am I getting this error? Thanks in advance.
int myfunctions[] =
{
Scene1(),
Scene2(),
Scene3(),
Scene4(),
Scene5(),
Scene6(),
Scene7(),
Scene8(),
Scene9(),
Scene10(),
Scene11(),
Scene12(),
Scene13(),
Scene14(),
Scene15(),
Scene16(),
Scene17(),
Scene18(),
Scene19(),
Scene20(),
Scene21(),
Scene22(),
Scene23(),
Scene24(),
Scene25(),
Scene26(),
Scene27(),
Scene28(),
Scene29(),
Scene30(),
Scene31(),
Scene32(),
Scene33(),
Scene34(),
Scene35(),
Scene36(),
Scene37(),
Scene38(),
Scene39(),
Scene40(),
Scene41(),
Scene42(),
Scene43(),
Scene44(),
Scene45(),
Scene46(),
Scene47(),
Scene48(),
Scene49(),
Scene50(),
Scene51(),
Scene52(),
Scene53(),
Scene54(),
Scene55(),
Scene56(),
Scene57(),
Scene58(),
Scene59(),
Scene60(),
Scene61(),
Scene62(),
Scene63(),
Scene64(),
Scene65(),
Scene66(),
Scene67(),
Scene68(),
Scene69(),
Scene70(),
Scene71(),
Scene72(),
Scene73(),
Scene74(),
Scene75(),
Scene76(),
Scene77(),
Scene78(),
Scene79(),
Scene80()
}