Windows 8.1运行c++程序后死机
Windows 8.1 freezes after running a C++ program
我一直在用Ubuntu编程,我偶尔也用过Windows 8,它总是运行得很好。现在我升级到Windows 8.1,并安装了Visual Studio 2013和Qt Creator与MinGW,所以我可以在任何操作系统中学习c++。
问题是当我运行一个c++程序时,它会冻结我用来运行它的代码。我用MinGW和VS编译器编译了这个程序,我总是有这个问题。代码只不过是一个简单的Hello World,所以我不知道发生了什么。我在Windows 8.1中通过命令提示符运行了一个c#程序,一切正常,但是当我尝试一个c++程序时,命令提示符冻结了,即使使用taskkill/PID/t/f,我也无法关闭它,它说:
ERROR: The process with PID <pid> (child process of PID <pid>) could not be terminated.
Reason: There is no running instance of the task.
有时我可以让命令退出,但它仍然留在任务列表中。它甚至一度冻结了Visual Studio。大多数时候,我不能关闭命令提示符,我不能在它上面写任何东西,它一直在消耗内存和cpu。我已经试着找到一个解决办法,但是我找不到,我希望我能在这里得到一些帮助。
编辑
我使用Avast! 2014
,代码是:
#include <iostream>
int main() {
std::cout << "Hello, world" << std::endl;
return 0;
}
从评论到问题:
-
一种可能:杀毒软件干扰。
-
问题确实出在我的杀毒软件上。
相关文章:
- 获取日期异步信号安全吗?如果在信号处理程序中使用,它会导致死锁吗
- PC中的程序和PHONE中的本机描述应用程序之间的数据连接
- 为什么导入Mixed native/CLR lib.dll的本机C++应用程序没有在Mixed lib.dll中的外部变
- 为什么这个程序的结果是3 "born"?和 4 死
- 使用本机 C++ 应用程序中的 C# 代码
- 在自定义程序中使用本机 Windows 自然顺序排序
- 将音频从浏览器流式传输到WebRTC本机C++应用程序
- 我的web应用程序的用户需要在浏览器上手动启用本机客户端吗
- 多线程Windows GUI应用程序中的死锁
- 如果我对"while"块发表评论,为什么程序会死机?其中的"yield"线有何影响?
- 如何在QML应用程序中显示本机窗口?
- Electron应用程序和Win32本机桌面应用程序之间的进程间通信
- 程序在 C++11 中使用条件变量进入死锁
- React 本机 0.59 应用程序崩溃并出现 libc 错误
- 使用QT应用程序翻译本机OS FileDialog
- 混合模式程序集是针对版本 'v2.0.50727' 构建的 ...本机C++/Visual C++/C# 项目错误
- 如何更正收银机程序的输出?
- 死锁和/或在线程死机之前返回
- 只有一个线程可能会导致 Linux 上的程序死锁或冻结
- Windows 8.1运行c++程序后死机