L
Lou Pecora
g++ compiler error question.
I have a container C whose constructor takes a class B that is inherited
from an abstract class A. So I have the line of code:
B binstance;
C cinstance(binstance);
The compiler gives the error,
error: variable `C cinstance' has initializer but incomplete type
I am trying to figure out what this means. What's an incomplete type?
I have all the methods that were abstract in A explicitly in B. I have
done this before with other classes inherited from the same abstract
class A and had no problems. Never seen this error before. What the
heck is going on? Any information will be greatly appreciated. I am
stuck. Thanks.
-- Lou Pecora (my views are my own) REMOVE THIS to email me.
I have a container C whose constructor takes a class B that is inherited
from an abstract class A. So I have the line of code:
B binstance;
C cinstance(binstance);
The compiler gives the error,
error: variable `C cinstance' has initializer but incomplete type
I am trying to figure out what this means. What's an incomplete type?
I have all the methods that were abstract in A explicitly in B. I have
done this before with other classes inherited from the same abstract
class A and had no problems. Never seen this error before. What the
heck is going on? Any information will be greatly appreciated. I am
stuck. Thanks.
-- Lou Pecora (my views are my own) REMOVE THIS to email me.