

Hi
As far as I'm concerned, the reason for this error is that the entry point is not defined.
The application code must define an appropriate entry point: main or wmain for console applications, and WinMain or wWinMain for Windows applications.
For more details, I suggest you could refer to the Doc:
Linker Tools Error LNK2019
An entry point isn't defined
All C++ programs must have a main function. If you try to compile a C++ program without a main function, the compiler raises an error.
Best Regards,
Jeanine
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
First of all, the errors being reported are linker errors, not compilation errors. They have nothing to do with the iostream header.
Your first step should always be to look up the explanation of the error message in Microsoft's documentation. Did you do this?
The error about unresolved external references in the image posted above usually results from a mismatch between code being compiled (console application uses main (or wmain) entry point while windows desktop application typically uses WinMain (or wWinMain) and the subsystem value used by the linker in the project properties.
If you want to create a console application I suggest you start over and make sure to pick a console application project from the New projects templates.
9 people are following this question.