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 7848597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:15:42+00:00 2026-06-02T18:15:42+00:00

I want to make a very generic pure virtual class i_BIS_Data that will be

  • 0

I want to make a very generic pure virtual class i_BIS_Data that will be inherited by unique BIS_Data classes.

class i_BIS_Data
{
public:

i_BIS_Data(void) { }
virtual ~i_BIS_Data( void ) { }

  virtual void setData(bis_data data) = 0;
};

I want all my children of i_BIS_Data to define the bis_data struct as they all will be different. I expect my child class to look similar to the following:

class BIS_0192_Aircraft_ID_Data : i_BIS_Data
{
  public:

  struct bis_data
  {
   UInt16  acid; 
   UInt16  parity; 
  };

  void setData(bis_data data){   m_data.parity = data.parity; 
                             m_data.acid   = data.acid; }
}

When I try to compile a class that uses BIS_0192_Aircraft_ID_Data, I get the following error: error C2061: syntax error: identifier ‘bis_data’. I believe its because I haven’t defined bis_data within the parent class.

So is it possible to “overload” the structure and allow multiple children classes to define what bis_data is?

  • 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-02T18:15:45+00:00Added an answer on June 2, 2026 at 6:15 pm
     template<typename BIS_DATA_T>
     class i_BIS_Data
     {
          typedef BIS_DATA_T bis_data;
          ...
          virtual void setData(bis_data data) = 0;
     };
    
     struct bis_0192_data
     {
        UInt16  acid; 
        UInt16  parity; 
     };
    
     class BIS_0192_Aircraft_ID_Data : public i_BIS_Data<bis_0192_data>
     {
       public:
       void setData(bis_data data){   m_data.parity = data.parity; 
                             m_data.acid   = data.acid; }
     };
    

    This should work, however subclasses of i_BIS_Data<XX> with different types for XX are incompatible.

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

Sidebar

Related Questions

Let's make this very easy. What I want: @array = qw/one two one/; my
I'm creating a very simple django upload application but I want to make it
I have style sheet with a class name changebackgroundcolor i want make change in
I am trying to make a generic URL rewrite methods, and i want it
I'm trying to make a very simple asp.net page that binds a GridView using
I want make datetimepicker in my project. Using jquery how it is possible? I
I want make a bash script which returns the position of an element from
I want make interactive application where user launches it and can do various task
Let's say I want make some of my sources publicly available via my blog
I use codeigniter and i want make uniqid code with php as following code(by

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.