dancing with my shadow
discovering, learning, reflecting and creating
Pages
Home
About
Friday, 27 May 2011
C++ tips: use forward declaration when possible
Found a good explanation of forward declaration in C++ header files
here
. Basically, if a class A is only used as a reference or a pointer, it should only need to be included as:
class A; //#include <A.h> // Not like this
No comments :
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments ( Atom )
No comments :
Post a Comment