ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

c-Qt堆内存损坏

2019-10-10 03:08:35  阅读:10  来源: 互联网

标签:c windows qt visual-c



我正在编写一个Qt 4.6应用程序(没有qt设计器),当我关闭程序时,我从Visual Studio收到此错误:

Windows has triggered a breakpoint in
Test.exe.

This may be due to a corruption of the
heap, which indicates a bug in
Test.exe or any of the DLLs it has
loaded.

This may also be due to the user
pressing F12 while Test.exe has focus.

The output window may have more
diagnostic information.

这是源代码:

> Main.cpp http://pastebin.com/DeUvZSHU
> TesterWindow.h http://pastebin.com/SEVr8x40
> TesterWindow.cpp http://pastebin.com/MYUtZZGw
> Device.h http://pastebin.com/bXKxVrmW
> Device.cpp http://pastebin.com/H1kMcRes
> ExtWiiMote.h http://pastebin.com/uX3HT9Yw
> ExtWiiMote.cpp http://pastebin.com/p2TKZdHv

(您无法编译,我无法共享使用的库)

怎么了?

解决方法:

在ExtWiiMote.h中,您声明了

QLabel* dots[3][3];

在ExtWiiMote.cpp中,您使用点[3] [0] ….

修复点数组的大小,可能会没事的.



标签:c,windows,qt,visual-c

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有