Header files
1. It is best to include a.h file in a.cpp at the top to insure order of header files are irrelevant, which is very good design. There could be forward declarations.
A header file should be included only when a forward declaration would not do the job.
a.The size of the class’ objects is not needed.
b.The names or types of any of the class’ members are not needed.
c.The prototypes to or names of any of the class’ member functions are not needed
The header file should be so designed that the order of header file inclusion is not important.
The header file inclusion mechanism should be tolerant to duplicate header file inclusions.
An easy problem
My little brother just asked me about finding number of ways to divide numbers from 1 to N into two sets where the sums are equal. N<37. It feels like simple DP problem.
-
Recent
-
Links
-
Archives
- April 2011 (3)
- March 2011 (21)
- May 2010 (1)
- January 2010 (2)
- December 2009 (2)
- August 2009 (1)
- July 2009 (2)
- April 2009 (4)
- March 2009 (6)
- February 2009 (5)
- January 2009 (4)
- December 2008 (3)
-
Categories
-
RSS
Entries RSS
Comments RSS