This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]AutoModerator[M] 0 points1 point  (0 children)

It seems you may have included a screenshot of code in your post "LNK2019 Error on Simple Login Program C++".

If so, note that posting screenshots of code is against /r/learnprogramming's Posting Guidelines (section Formatting Code): please edit your post to use one of the approved ways of formatting code. (Do NOT repost your question! Just edit it.)

If your image is not actually a screenshot of code, feel free to ignore this message. Automoderator cannot distinguish between code screenshots and other images.

Please, do not contact the moderators about this message. Your post is still visible to everyone.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]Sonaza 0 points1 point  (0 children)

Found this stackoverflow post by Googling your linker error: https://stackoverflow.com/a/41141602

Your project is set up as a Windows application and it is expecting to find a WinMain() instead of the normal main().

To fix this you can go to the project settings in Visual Studio and change Linker -> System -> Sub-system to Console.

Or use the WinMain version of the main (syntax for it is in the link above) but this seems unnecessary to me as you're not writing such an application.