0

Whenever I press F5 to compile and run a C++ program in Visual Studio 2013, the program stops responding without outputting any error. The cursor becomes busy and the application just hangs.

Here are the steps:

  • Create a new Visual C++ console project
  • Unselect everything to make it an empty project.
  • Add the following code to a main.cpp:

    #include <iostream>
    
    int main() {
        std::cout << "Hello World!" << std::endl;
        std::cin.get();
        return 0;
    }
    
  • Compile: works fine

  • Run with debugger: Mouse turns busy and app becomes unresponsive.

It seems to work when I run without debugging, but there are no console outputs to check. Updated to latest VS2013 release and rebooted the computer just in case there's an error. Running in Windows 10.

Jason
  • 13,563
  • 15
  • 74
  • 125

1 Answers1

1

There were at least two times here at Stack Overflow where others had something similar happen, and it was due to Avast anti-virus software. If you're using Avast, you might want to see if there's a workaround.

rcgldr
  • 27,407
  • 3
  • 36
  • 61
  • More than two, there are over a dozen recent [duplicates of this Avast problem](http://stackoverflow.com/questions/33690697/running-my-c-code-in-visual-studio-gives-me-a-blank-cmd). – Blastfurnace Nov 26 '15 at 05:28
  • Wow you guys are my hero(s). I searched and searched and couldn't find anything related. – Jason Nov 26 '15 at 14:08