如何找到c ++运行时错误的原因 [英] how to find the cause of c++ runtime error

查看:91
本文介绍了如何找到c ++运行时错误的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对一个可能看起来很愚蠢的问题感到困惑

我的应用程序一开始运行良好

但是有时候通过

它崩溃了c ++运行时错误

i检查我的代码几乎所有内容

什么都没有



i想知道有没有工具这可以帮我找到导致c ++运行时错误的地方



可能是我的问题看起来很蠢



对不起打扰任何人

谢谢你提前

i am confused by a problem that may look stupid
my application run well at first
but sometime passed
it crashed with the c++ runtime error
i check almost everything in my code
got nothing

i want to know is there any tools that can help me find where caused the c++ runtime error

may be my question look so stupid

sorry for bother anyone
thank you advance

推荐答案

它看起来像一些指针混乱。首先使用警告级别4编译。检查所有消息,避免输入类型。初始化所有变量。



运行带有调试信息的调试版本或发布版本,并在普通shell中运行它。尝试找出错误:代码的哪些部分正在发生。



查看指针代码。使用ASSERT和其他检查。使用Debugview。最后可以写一个日志来缩小bug。



祝你好运; - )
It looks like some pointer mess. At first compile with Warning Level 4. Check all messages, avoid type cast stuff. Initialize all vars.

Run a debug build or release build with debug information and run it in the normal shell. Try to locate the error: in which parts of the code ist happening.

Look through your pointer code. Use ASSERT and others checks. Use Debugview. At last can can write a log to narrow the bug

Good luck ;-)


这篇关于如何找到c ++运行时错误的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆