I'm attempting to pass an array to a function and I'm getting "undefined reference to fillArray(int*) " when attempting to build. I've been searching online all evening to know avail.
This program is supposed to fill an array with randomly generated numbers, but I stripped it down to this code to find what was giving me an error. I'm using eclipse C++.
Here's a code snippet:
Thanks in advance, sorry if it's extremely obvious. :p
This program is supposed to fill an array with randomly generated numbers, but I stripped it down to this code to find what was giving me an error. I'm using eclipse C++.
Here's a code snippet:
Code:
void fillArray(int);
int main ()
{
int const size = 20;
int array1[size], array2[size], array3[size];
fillArray(array1);
}
void fillArray(int blankArray) {
cout << "Testing 1 2 3 Testing";
}
Comment