undefined reference to `WinMain‘collect2.exe: error: ld returned 1 exit status

Today, C + + encountered this error. Although others may not encounter it, I still want to record my mistakes

The causes of the problem are as follows

Several lines of code report errors. At last, it turns out that main is wrong and written as Mian

If you modify it, you won’t report an error


Read More: