Hello
I'm trying to call a function and pass a value of an array to it I'm not sure in how to do it... the function call and setting up the functions.
Some help from the pros would be nice
Thanks
Printable View
Hello
I'm trying to call a function and pass a value of an array to it I'm not sure in how to do it... the function call and setting up the functions.
Some help from the pros would be nice
Thanks
Code:
void Func(int iVar) //The function, integer as parameter
{
}
int main()
{
int iArray[8]; //Create an array
Func(iArray[0]); //Pass a value from the array to the function. In this case element 0
return 0;
}
I've asked before about this, so if you use the "search" you'll find some more examples as well.