I'm a novice C++ programmer and I only know how to program in visual studio, but my PC crashed and I only have mac Xcode available.

I wrote a .cpp like in visual studio, but when I had it build, it gave me this error.. 

ld: duplicate symbol \_main in /Users/karen/Desktop/BD/build/BD.build/Debug/BD.build/Objects-normal/x86\_64/bd1.o and /Users/karen/Desktop/BD/build/BD.build/Debug/BD.build/Objects-normal/x86\_64/main.o

Anyone know what to do?