Home > Back-end > The humble small white online for help
The humble small white online for help
Time:09-27
When two classes to be with each other to define types should be how to write ah I have A class A and class B, A member of the type of the variable A b_type in B, B in the member variables of B type is A a_type, how do you write to no error
Class A { Public: Using a_type=int; B: : b_type a; } Class B { Public: Using b_type=int; A: : a_type b; }
CodePudding user response:
class B;//the predefined Class A { Public: Using a_type=int; B: : b_type a; } Class B { Public: Using b_type=int; A: : a_type b; }