Sign in to follow this  
AcidZombie24

inherit problem/Unroll class

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

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