Sariss
2010-12-11 08:12:34 UTC
undefined reference to `reverse(double*, int)'
collect2: ld returned 1 exit status
My codes concerning the reverse are...
void reverse(double array[], int size);
//This funciton receives an array and its size.
//The function reverses the order of all elements in the array.
//For example, if array=[6,2,5,3,4], the funciton changes it to array=[4,3,5,2,6].
.
.
.
.
//Reverse the GPA list.
reverse(GPA, size);
//Output the reversed list.
cout<<"GPA list after reversing"<
.
.
.
.
.
void reverse (double array[], int size, double number)
{
for (int i=0; i <= size; i++)
{
swap( array[i], array[0]);
}
}
.
.
.
.
.
What does the error mean? How do I correct it?