简体   繁体   中英

“Hello world!” freeze in c++

I tried to compile a simple Hello World in C++ to test that my Visual Studio 2013 on my Windows 10 works well but I've a problem. My program compile but when I run, it freeze. It's an empty Win32 Console Application with a "main.cpp" :

#include <iostream>
using namespace std;

int main()
{
    cout << "Hello world!";
    return 0;
}
  • If I launch it from Visual Studio in debug (with "Run"), Visual Studio freeze and I need to kill its task.
  • If I launch it with the executable or with "Run without Debugging", nothing appear, "System" process doesn't want to free the execution and I can't recompile without restart the computer because of that.

I am confused. If somebody have an idea of what's happening, please help me.

Update 1 : I repair my installation. Same problem. Breakpoint doesn't help. It seems to freeze before. And also no trace of a task in the task manager when launched without debugging.

It was my antivirus' fault (in my case, Avast). I made it ignore my Visual Studio projects and it works. Solved by @Blastfurnace.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM