I have 2 classes class A and B, to use the default constructor of I class B, the default constructor of class A I'm trying to call. Value of class A in class B
class A (a); Int x; } A: A () {// start x x = 10; } Class B {b ()); A Edge; } B :: B () {// Be the first to call the default constructor of class A to start the ABAbZ (); } I did not get any match calls for '(AOJJE)'. Please help me solve.
Actually, unless you explicitly build a member otherwise you will not. If you really want to prepare a member clearly, whether it is a basic build or something else, then you will need to add your initial member to the initial list:
B :: B (): Aobj () {} Expression in the body of a function aobj () member try function using call operator at aobj Does . It may be appropriate to do this, like, when aobj type std :: function & lt; Void () & gt; .
Comments
Post a Comment