you have to give the arran a name
player = numPlayers(int MyArray[NUMPLAYERS]);
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
you have to give the arran a name
player = numPlayers(int MyArray[NUMPLAYERS]);
Yuuc! that is totally wrong. If you are calling the function all you have to do is put the name of the array there, not the array size
player = numPlayers(MyArray);
if (player < NUMPLAYERS)
you have to add the substript to he array
if (player[i] < NUMPLAYERS)
{
player[i] = i;
}
return player;
The above will return a pointer to the array. You declared the function returns an integer. Either change the function prototype/preemble or change the return value.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
you have to replace MyArray with the name of the array you created in your program. I only posted an example of how to do it, and did not intend for you to just copy/paste it into your program without appropriate change.
you posted the function but you did not post main() or the function that calls bowlerNumber(), so I don't know the name of the array you need to pass.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343