I have been having this problem with this program for the past few days, I can't seem figure out what I did wrong to make it act this way. I have a feeling it has to do with inputing an array in a function but I am not sure. Any and all help would be appreciated.
I was able to get the program to work without functions but I am required to use them for this asignment.
I would preferabley like to have this answered before 26 September 2011 11:59 central time.
Your prototypes don't match their definitions. More specifically, the parameter lists don't match the definitions. Each prototype function parameter list accepts an array as an argument. For this to work, the parameter that accepts the array must be a pointer, just like this example:
1 2 3 4 5 6 7 8 9 10 11
void Function( int[6] ); // int[] is the same as int*
int main( )
{
// ...
}
void Function( int Array[6] )
{
// ...
}
Since you know the size of each array (judging by your code), I would recommend that you pass the array by reference, like this: