Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7811829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:18:35+00:00 2026-06-02T04:18:35+00:00

Please help me explain unexpected crash!!! I have: x.h class x: QObject struct {

  • 0

Please help me explain unexpected crash!!!
I have:

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;

….etc

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)) -< not crash here

if((bitmap.S2L_NOTIFY.color.state == 3)) -< not crash here

Please tell me where am i wrong or compilator wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:18:36+00:00Added an answer on June 2, 2026 at 4:18 am

    The problem is that you have x in your condition, but the function x::rndfunc() is a member function of class x… not a variable. It should be:

    // "this" refers to the current instance of class x
    if((this->y.z.f.nmb2 == NOTOK) && (this->y.z.f.nmb1 == NOTOK))
    

    or simply:

    // but the "this" isn't actually necessary
    if((y.z.f.nmb2 == NOTOK) && (y.z.f.nmb1 == NOTOK))
    

    (as you wrote).

    EDIT: Okay, so there was a typo in the original question, so the above is no longer relevant. The new answer is:

    f does not have a member variable nmb1, only nmb2.

    EDIT #2: More typos. My new answer:

    What you’re trying to do looks really messy. Don’t do it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Could someone please help explain why I can't get this to work? I properly
Please help me ! I have a problem in Crystal Report at visual studio::
Please help! Background info I have a WPF application which accesses a SQL Server
please explain purpose of usage of locale in c++? i have read documents but
I have been stuck on this all weekend and failed miserably! Please help me
Its difficult to explain this situation but please see the example. I have coded
Can someone explain to me this code new Object[]{PLease,Help}; Ive never seen code like
I don't understand why it has two difference result. Please help me, to explain
Can some one please help explain why when I block and continue observer's onNext
I'm trying to optimize this mysql query using EXPLAIN. Can somebody please help me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.