I put several instances of class b in class a, but this causes an error because class a does not know what class b is.
Now I know that I can solve this problem by writing a bac file, but it interferes with reachability and also annoys me. I know that I can prototype my functions, so I do not have this problem, but I can not find material on how to prototype a class.
Does anyone have an example of prototyping a class in C ++.
since there seems to be some confusion, let me show you what I want
class A { public: B foo[5]; }; class B { public: int foo; char bar; }
but this does not work, because A cannot see B, so I need to put something in front of me, if it was a function, I would put A (); then implement it later. how can i do this with a class.
source share