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

  • SEARCH
  • Home
  • 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 6193903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:12:08+00:00 2026-05-24T03:12:08+00:00

I am attempting to ask this question again due to my failure to state

  • 0

I am attempting to ask this question again due to my failure to state the question clearly yesterday. Basically, I have an access violation error described in the comment in the code below… any idea why?

Class A 
{
private:
    BOOL a;
    BOOL b;
    int i;
public:
    A() {a = FALSE; b = FALSE; i = 0;}
....
}


Class B : public A 
{
public:
    B() {} // empty constructor
....
}

Class C
{
public:
    C() {} // <-- when the constructor is calling the CButton and CCombobox 
           // default constructor for the member "cb" and "button", it overrides 
           // the address space of some of the variables defined in class A 
           // (e.g. a, and b would be changed to some garbage)
           // Basically, any variable defined below 'y' will have similar 
           // problems, though not exactly the same variables from 'y' will 
           // be changed..
private:
    int x;
    B y;
    CCombobox cb;
    CButton button;
}
  • 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-05-24T03:12:08+00:00Added an answer on May 24, 2026 at 3:12 am

    I’ve found the solution to my problem. The cause of the problem is that Class A is built to a dll with a different struct alignment than class B and C.

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

Sidebar

Related Questions

I'm fairly new to this, and don't have anyone else to ask. I'm attempting
Several tries to ask this question in #android-dev (irc) and hours of searching, but
I have a question this time around regarding the Android custom camera, NOT the
I'm ask/answering this question because it hung me up & it's likely someone else
Attempting to build a C# NPAPI plugin I have found a tutorial which describes
Attempting to get Spring internationalization working. I have used classpath:messages basename, created .properties files
Attempting to use the data series from this example no longer passes the JSONLint
Attempting/struggling to get registration and sign-up working within an active admin project. I have
I'm aware of this question which mentions Boost's STATIC WARNING, but I'd like to
I feel like every second question i ask here is relating to Facebook Connect

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.