According to this thread on Dream.In.Code:
Right click on project name -> Properties -> Expand Linker tab -> System -> SubSystem: make sure that it is
Console (/SUBSYSTEM:CONSOLE)
Alternatively, if you want to hide the console window or are debugging a multithreaded application, you should set the SubSystem to Window (/SUBSYSTEM:WINDOW)
instead.