I am making a trivia game and want to run random questions that I have in functions. I have created this code as a test these are not the actual functions I would run:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
int N = 3;
void (*func_ptr[3]) = { moreInformation, startofgame, level1}; [rand() % N]();
but every time I run it I get an error saying I have to put an identifier in the last pair of parentheses. Is there a different way to do this or what should I put as an identifier in the parentheses.
Aucun commentaire:
Enregistrer un commentaire