Ok thanks it seems to be kind of working but I am getting the right numbers printed out but then a big random number at the end.
I input 1 2 3 4 5 6 in both arrays so that should be the output but instead of...
1 2 3 4 5 6
i get
1 2 3 4 5 6 2293468
Here is the function...
Code:
int numbers (int draw[], int entry[])
{
for(int i=0; i<MAXSIZE; i++)
{
for(int j=0; j<MAXSIZE; j++)
{
if(draw[i]==entry[j])
cout << draw[i] << " ";
}
}
}
I output it like this..
Code:
cout << numbers(draw, entry) << endl;
Any reason why the extra number is showing up?
Thanks