I just had an interview. I was asked what is a \"forward declaration\". I was then asked if they were dangers associated with forward declarations.
I could not answer to
Another danger of forward declarations is that it makes it easier to violate the One Definition Rule. Assuming that you have a.h forward declaring class B
(which is supposed to be in b.h and b.cpp), but inside a.cpp you actually include b2.h which declares a different class B
than b.h, then you get to undefined behaviour.