dancing with my shadow
discovering, learning, reflecting and creating
Pages
(Move to ...)
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
‹
›
Home
View web version
No comments:
Post a Comment