I’m writing a Qt 4.6 application (without the qt designer) and when I close the program I get this error from 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.
Here is the source code:
Main.cpphttp://pastebin.com/DeUvZSHUTesterWindow.hhttp://pastebin.com/SEVr8x40TesterWindow.cpphttp://pastebin.com/MYUtZZGwDevice.hhttp://pastebin.com/bXKxVrmWDevice.cpphttp://pastebin.com/H1kMcResExtWiiMote.hhttp://pastebin.com/uX3HT9YwExtWiiMote.cpphttp://pastebin.com/p2TKZdHv
(You can’t compile it, I can’t share the used library)
What’s wrong?
In
ExtWiiMote.hyou declaredand in the
ExtWiiMote.cppyou usedots[3][0]....Fix
dotsarray size and probably you’ll be fine.