the linking error appeared because you’ve made a workspace for win32 windows applications; the function WinMain() is for windows what main() is for ms-dos console applications
i assume you are using visual studio… if so, create another workspace specifying it will be a console application type; copy all the code you’ve written and compile again; success is guaranteed