At debugging the code, the program gives 2 errors

Error 1 error LNK2001: unresolved external symbol _mainCRTStartup

Error 2 error LNK1120: 1 unresolved externals

Is this the first console program you have written since installing that compiler? Maybe you have a configuration problem.

it is the first time to use the program on windows 7

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