derived class before writing the base class?.
If can good....
If I can't can someone tell me why I can't do that?
You can't inherit from a in-complete class/struct type.
So when do we normally forward declare a class?
When you just want to say we have a type. This is useful to reduce compile time. It's usually used in libraries (or large projects), they forward declare those types which: 1- Don't need to be included in user-code 2- And mostly change a lot.
read this: https://stackoverflow.com/a/553869/9248466
Обсуждают сегодня