saianurag (0)

I'm an absolute beginner and can anyone help me with the error.

You are viewing a single comment. View All
mwilki7 (956)

you have 2 files with a "main()" function
the compiler cant figure out which one to use

you can see that the error message is describing where the error is for you:
main1.c:(.text+0x0): multiple definition of 'main'

KelvinVerhey (43)

@mwilki7 @saianurag this is a correct.

Make sure you delete main1.c from the project and it will compile. That is a direct copy of main.c and as mentioned puts two main() functions in the project. The compiler can only sort out one entry for a program.