I'm having this Linker error: undefined reference to 'WinMain@16'
Here's the code:
#include<iostream>
#include<conio.h>
#include<math.h>
using namespace std;
double dist(double array1[4], double array2[4])
{
    double Sum;
    double distance;
        
        
        
        
    for(int i=0;i<4;i++)
    {
        cout<<"Enter value of first coordinate";
        cin >> array1[i];
        cout<<"Enter value of second coordinate";
        cin >> array2[i];
        
        Sum = Sum + pow((array1[i]-array2[i]),2.0);
        distance = sqrt(Sum);
    }
        cout << "DISTANCE: " << distance;
    return distance;
}
I don't understand what part of the code is the cause of this error.
 
    