I created a new C++ project
named test2 in Visual Studio 2015 this way:
File > new > project > win32project (test2) > OK > Nest > checking the Empty project > Finish > Add New Item > C++ (source file) "test2" > Add.
Then I wrote the following simple code:
#include <iostream>
using namespace std;
int main()
{
int a = 5;
int& b = a;
b++;
cout << a << ' ' << b << endl;
system("pause");
return 0;
}
When running the code I got this serious error:
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol _WinMain@16 referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) test2 c:\Users\Me\documents\visual studio 2015\Projects\test2\test2\MSVCRTD.lib(exe_winmain.obj) 1
What is the problem please?