SO here it is;
start with an array that couts random numbers I used the generate function
now check those numbers if they repeat so return true
if false is returned then you can go onto the next random_integer to check..here I use the contains function
the problem is generate is an int function that makes numbers, and I'm checking those numbers in that array with a bool function....help plz

int generate(int array[], int n, int lower, int upper)
{
	for (int i=0;i<n;i++)
	{
		array[i]=lower + rand()%(upper-lower+1);
		contains
	}
return 0;
}
bool contains( int nums[], int random_integer)
{
	
	int size;
	int max;
	int min;

	for(int index=0;index<size)
	{
		nums[index]=//initialize nums wth the numbers in generate
	}
		if (generate [random-integer-1==nums[], max, min)
		{
			generate [random_integer-1]);
			
			cout<<random_integer<<endl;
			return false;//if the number is not already there then it's false and then you can check next
		index++;
		}
	
					
		else
		{
		return true;
		}
}	
int main()
{
srand(time(0));

Um...what?

I'm sorry I thought I was clear; my problems is checking the numbers in my generate function with my bool contains function...
this is the error I get
error: cannot convert ‘BingoCard’ to ‘int*’ for argument ‘1’ to ‘bool contains(int*, int)’

>error: cannot convert ‘BingoCard’ to ‘int*’ for argument ‘1’ to ‘bool contains(int*, int)’
You haven't posted enough code. BingoCard isn't even mentioned in the code you posted.

I really don't want to post my whole code...too long. BingoCard is a struct, and the functions I'm trying to use is for that struct...it works, but I'm having problems with the functions
byw iam reading other posts and none seem to match with my problem

This article has been dead for over six months. Start a new discussion instead.