A simple array question
-
And its confounding me... I have an array Arr in which I stored the values of 1 row of a database, and the size of this is the number of fields n. Now I want to send this off to a function in a parameter list like
myFunc(Arr[0], Arr[1], Arr[2],....,Arr[n-1])
I cant do a for n =0, n++ type loop since I need them all at once> So what is the way to go here? Appreciate your help, ns -
And its confounding me... I have an array Arr in which I stored the values of 1 row of a database, and the size of this is the number of fields n. Now I want to send this off to a function in a parameter list like
myFunc(Arr[0], Arr[1], Arr[2],....,Arr[n-1])
I cant do a for n =0, n++ type loop since I need them all at once> So what is the way to go here? Appreciate your help, nswhy can't you just pass in the entire array to myFunc? Seems like that what you want.... Just trying to keep the forces of entropy at bay
-
why can't you just pass in the entire array to myFunc? Seems like that what you want.... Just trying to keep the forces of entropy at bay
-
The function demands that the parameters be fed in as I showed....I cant change that. Otherwise your idea is great! Appreciate your help, ns
-
does the function takes a limited or variable number of parameters? i mean is it like printf ?? Papa while (TRUE) Papa.WillLove ( Bebe ) ;
-
And its confounding me... I have an array Arr in which I stored the values of 1 row of a database, and the size of this is the number of fields n. Now I want to send this off to a function in a parameter list like
myFunc(Arr[0], Arr[1], Arr[2],....,Arr[n-1])
I cant do a for n =0, n++ type loop since I need them all at once> So what is the way to go here? Appreciate your help, nsyou could change it from this
myFunc(Arr[0], Arr[1], Arr[2],....,Arr[n-1])
to thisi=0 ; myFunc(Arr[i], Arr[++i], Arr[++i],....,Arr[++i])
I'm new here, pardon the n00bing -
you could change it from this
myFunc(Arr[0], Arr[1], Arr[2],....,Arr[n-1])
to thisi=0 ; myFunc(Arr[i], Arr[++i], Arr[++i],....,Arr[++i])
I'm new here, pardon the n00bing