Help calling a function in a function

made a function and need to use a function inside a function. I hope it makes sense. Ask below if you need clarification.
void Init_Keno(int arr[], int size);
void twenty_Num();

int main(){

int KenoArray[81];
Init_Keno(KenoArray, 81);

twenty_Num();
}

void Init_Keno(int arr[], int size){
for(int i =0; i < size; i++)
{
arr[i]=0;
}
return;
}

void twenty_Num()
{
srand(time(0));
int KenoArray[81]={0}; //how do i use the parameter or function i made above instead of saying this again?

int j;
int count=0;
int ranNum;

count=0;
while(count <20)
{ ranNum= rand() %80+1;
if (KenoArray[ranNum]==0)
{
cout<< ranNum << endl;
KenoArray[ranNum]=ranNum;
count++;
}
}
return;
}
Make it so that twenty_Num() has the same parameters as Init_Keno(...). So you can use the same array in Init_Keno(...) and twenty_Num() (passing the array in main()).

By the way: Use srand(time(0)); only once at the top of main() to start the randomizing.
Still didn't work when i tried this.....

void Init_Keno(int arr[], int size);
void twenty_Num(int arr[], int size);

int main(){

int KenoArray[81];
Init_Keno(KenoArray, 81);

twenty_Num(KenoArray, 81);
}

void Init_Keno(int arr[], int size){
for(int i =0; i < size; i++)
{
arr[i]=0;
}
return;
}

void twenty_Num(int arr[], int size)
{

int KenoArray[81];
Init_Keno(KenoArray, 81);

int j;
int count=0;
int ranNum;

count=0;
while(count <20)
{ ranNum= rand() %80+1;
if (KenoArray[ranNum]==0)
{
cout<< ranNum << endl;
KenoArray[ranNum]=ranNum;
count++;
}
}
return;
}
EDIT it worked
Topic archived. No new replies allowed.