   Classes using each other
  Hey. Can I do something like this:class TypeA{    TypeB toTypeB{   //code    }}class TypeB{    TypeA toTypeA{   //code    }}
  If you're talking Java then yes you can. This is in fact a very common practice with respect to listeners and such.   ;  Same for C#. In C++ you can use forward declarations: