Playerbase type not allowed when I try to pass struct array

closed account (yh54izwU)
I updated the code accordingly

How would I go about making this work I seem to have hit a wall. Also I REALLYYYY don't want to use a global struct (tisktisk).

I have tried tinkering with it like declaring q1() up top, i've tried q1(playerbase *player); and that gives me an "error expecting )". Sadly that is about all I can think of, thanks.

Thanks



void playerslist(int qnum);

struct playerbase;
void q1(playerbase* player);


void playerslist(int qnum){

struct playerbase{}
playerbase * player=new playerbase [];

q1(playerbase* playe); //Heres where the error message is
}

void q1(playerbase* playe){} //No content right now but wouldn't matter anyway
Last edited on
Make the function take a playerbase* as an argument.
closed account (yh54izwU)
Is there anyway you could show me how this would look using the code I have?
void q1(playerbase* player) {}

EDIT: Also, you'll need to have playerbase declared before the function definition.
Last edited on
Topic archived. No new replies allowed.