How to resolve the "multiple definitions of main" error?

Hello folks, I’m new to programming, so if I ask something dumb please forgive me. I need to calculate the area of a triangle, I used the structure-based approach to solve the given problem. This program runs fine on local IDE i.e. code blocks but in online IDE (i.e. IDE of EDX) it gives me the following error:
[
/tmp/cckOEMEY.o: In function main': main.cpp:(.text+0x0): multiple definition of main’
/tmp/ccwd1C41.o:student.cpp:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
]

I spent a little time debugging it but couldn’t get anything, if you can, please review the problem.
Also, if there is any better approach to the problem, please share it. Here is my code:

[
#include<bits/stdc++.h>
using namespace std;

struct vertex{
float x;
float y;
};

struct triangle{
vertex vertices[3];
};

void readInput(vertex &v){
cin>>v.x>>v.y;
}
float cal_area(triangle aTriangle) {
int i=0;
for(;i<3;){
readInput(aTriangle.vertices[i]);
i++;
}
return 0.5*((aTriangle.vertices[0].x*((aTriangle.vertices[1].y)-(aTriangle.vertices[2].y))) + (aTriangle.vertices[1].x*((aTriangle.vertices[2].y)-(aTriangle.vertices[0].y))) + (aTriangle.vertices[2].x*((aTriangle.vertices[0].y)-(aTriangle.vertices[1].y))));
}

int main(){
triangle aTriangle;
cout<<cal_area(aTriangle);
return 0;
}
]