c++ - Instance of Forward declared Class -


This is a follow-up question:. If the child has been forwarded to the parent's head.

Is not included in this, so the child will not get the complaint? Then how can I install a new hair object from the original object.

Parent.h

  #pragma #include & lt; Vector & gt; Using Std :: vector; Class child; Classroom Parents {Public: Generator (); Zero GiveBirth (); Generator (); The vector & lt; Hair * & gt; children; }; Parent.cpp   

} Zero Parents: GiveBirth () {Child F = hair (); // error: incomplete type is not allowed) Parents :: Generator () {}

Child.h

  #pragma #include "Parent.h" class Once Upon a Child: Parent {Public: Child (); ~ Hair (); };       ) {} hair: ~ hair () {}    

Here are some readable lists for you.

Parent.cpp

  #include "stdafx.h" #include "parent.h" #include "Child.h" Parents :: Guardian () () void parent: GiveBirth () {// Child CH = hair; // Error: Incomplete children are not allowed Push_back (new kid ()); } Parents :: Generator () {}    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -