Sign in to follow this  

inherit problem/Unroll class

This topic is 3717 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

class a, ab, ac are abstract class. ab1, ac1 are concrete. d has functions that A needs and adds in some vars for the functions. I want to use d in both in ab1 & ac1. i dont want to copy/paste d into ab1 and ac1, so how should i do this. the below is a bad visual of the inherit problem. ----------- class A {virtual funcA()=0}; class AB : public A{}; class AC : public A{}; class D { int blah; funcA(){} } class AB1 : public AB { unroll d }; class AC1 : public AC { unroll d }; [Edited by - AcidZombie24 on October 10, 2007 9:47:52 AM]

Share this post


Link to post
Share on other sites
I have no idea what you mean by "unroll". I'm not even actually sure what language you're talking about here. The syntax looks like C++, but C++ doesn't have generics; it has templates, but the way you used the term makes me wonder if you actually mean abstract instead.

Share this post


Link to post
Share on other sites

This topic is 3717 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this