Search This Blog

Monday, January 31, 2011

Best programming practice(C/C++):How to do you decide whether to have a variable as class member or static class member

Simple but people often do mistakes!
I have seen people writing code, where some of variables does not fit to be class member still used as class members. If a variable not required during the life of class instance then it is not required to have it as class member. Remember static class members are per class not per instance.

No comments:

Post a Comment