At debugging the code, the program gives 2 errors

Error 1 error LNK2001: unresolved external symbol _mainCRTStartup

Error 2 error LNK1120: 1 unresolved externals

int main()
return 0;

This compiles fine on my system; it must be your setup. Did you definitely make it clear that you wanted to create a console programme and not any kind of windowed programme?

i found a solution
the problem was that the cpp file is generated in "source files" folder

thank you

This question has already been answered. Start a new discussion instead.