I need help finding this error the compiler is giving me:
C:\Users\AppData\Local\Temp\ccaruUld.o Test3_Problem2.cpp:(.text+0x73): undefined reference to `SUM(float, float)'
C:\Users\Downloads\collect2.exe [Error] ld returned 1 exit status
Code:
    //Test 3 - Problem 2
#include<iostream>
#include<cmath>
using namespace std;
float SUM(float value,float sum);
int main()
{
    //Introduce program to user
    cout<<"This program asks for 5 numbers and averages the numbers \
together.";
    
    //Declare variables
    float averg,value[4],sum1=0;
    
    //Allow user to enter 5 values
    for(int i=0;i<=4;i++){
        cin>>value[i];
    }
    sum1=SUM(value[4],sum1);
    cout<<value[0]; 
    
}
    float SUM(float vales[4],float sum) {
        for(int i=0;i<=4;i++){
            sum+=vales[i];
    }
    return sum;
}
    
Cannot whatsoever find it no matter how much I fix my code. I looked at similair questions and since this is an entry level C++ course all of the answers looked like alien language to me...
 
     
     
     
    