>unresolved external symbol _WinMain@16
You're using the wrong project type. Your project is a Win32 project when it should be a console project. That error pops up because Win32 projects expect WinMain to be the entry point into the program instead of main.
>No one could explain to me in concise terms what "unresolved externals" actually are.
"Unresolved external" is a linker error. It says that you use a function or variable in your code, but that function or variable was never fully defined. For example, this code will give you an unresolved external error:
void foo(); // Declared, but not defined
int main()
{
foo();
}
It compiles fine, but when the linker tries to find the definition of foo, it can't, and bombs. If you fully define foo, the error goes away:
void foo()
{
// Defined now
}
int main()
{
foo();
}
In your case, the problem is the definition of the entry point. A standard C++ program starts with main, but the C++ runtime is the one that calls main, not you. You define it for the C++ runtime, but somewhere in the C++ runtime you have this little guy:
initialize_runtime();
main(); // Run the program
cleanup_runtime();
That's just peachy in the standard program that I asked you to run. However, if your project is a Win32 project, the C++ runtime expects WinMain:
initialize_runtime();
WinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
cleanup_runtime();
Since the C++ runtime expects WinMain, but you actually defined main, you get an unresolved external error when the linker can't find WinMain. The solution is to switch project types, or change your code to that of a Win32 application.