請幫我解釋意外的崩潰!!! 我:QT 4.8普通比較崩潰
x.h
class x: QObject
struct
{
struct
{
struct
{
int state;
double curstring;
QTimer timer_scroll;
QTimer timer_done;
}color;
struct
{
int state;
double curstring;
QTimer timer_scroll;
QTimer timer_done;
}mono;
}S2L_NOTIFY;
....等
x.cpp
void x::draw(const int type, QString str, bool isNeedAnswer)
{
if(type == 3)
{
//here is crash!
if(bitmap.S2L_NOTIFY.mono.state == 3 && bitmap.S2L_NOTIFY.color.state == 3)
{
if((bitmap.S2L_NOTIFY.mono.state == 3))
- <不會崩潰這裏
if((bitmap.S2L_NOTIFY.color.state == 3))
- <不會崩潰這裏
請告訴我,我錯了或compilator錯了嗎?
可以運行在'valgrind'或其他一些調試你的程序? – sarnold 2012-04-21 00:45:21
你至少應該發佈一個編譯代碼..你提供的是foobar。 – 2012-04-21 01:09:42