Friday, September 10, 2010

forward declaration in C++

Benefit:

Enable to implement interface completely in C++.

- Define a pure class as an interface
- Use forward declaration when needs it but don't include its header file
- If necessary, you can redefine this class to replace the original one