The array and the pointer are both problems. If you pass an array to a function, just pass the name of the array, and nothing more. Like so:
Then see my previous posts for how to pass an integer or a pointer.Code:int arrayfunction( int array[] ) { ...blah... } int main( void ) { int arrayofstuff[] = { 1, 2, 3, 4, 5, 6, 7 }; arrayfunction( arrayofstuff ); return 0; }
Quzah.



LinkBack URL
About LinkBacks


