Only thing I can think of would be references. Without seeing more code I really can't wrap my head around what you are doing to give you a better answer.
int main ()
{
int first[30];
srand( (unsignedint) time(NULL));
for (int i=0 ; i <= 30; i++)
{
first[i] = rand() % 30 + 1; // The will create up to 30.
}
for (int i= 0; i <= 30; i++)
{
cout << i <<" : " << first[i] << " " << endl;
}
read(first, first[i])
}
it show an error on read(first, first[i])
i want the number and element!
and how do you create a numbers line?
Well the error you are seeing is because you are trying to access the 'i' variable outside of its scope on Line 16. But to really help you we should see the function definition for "read()" and a copy paste of the specific error you are getting (in case there are more scoping issues) wouldn't hurt our efforts either.
I didn't even think about the fact that read() was out of scope to use i. I was focusing on read() because I thought he was wanting to know how to pass the data of read() to a function further down. Hence the references remark.