Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
A member variable is a type of class member
for an in-class variable.
For example, a Person class
might have a member variable to hold a Person his/her name.
LocalVersusGlobal is a simple benchmark that tests
the speed of local versus member variables
versus global variables.
- John Lakos. Large-Scale C++ Software Design. 1996. ISBN: 0-201-63362-0. Chapter 2.7: 'Use a consistent method (such as a d_ prefix) to highlight class data members'
- Scott Meyers. Effective C++ (3rd edition). ISBN: 0-321-33487-6. Item 22: Declare data members private.
- Herb Sutter, Andrei Alexandrescu. C++ coding standards: 101 rules, guidelines, and best practices. 2005. ISBN: 0-32-111358-6. Chapter 11: 'Hide information'.
- Herb Sutter, Andrei Alexandrescu. C++ coding standards: 101 rules, guidelines, and best practices. 2005. ISBN: 0-32-111358-6. Chapter 41: 'Make data members private, except in behaviourless aggregates (C-style structs).
- John Lakos. Large-Scale C++ Software Design. 1996. ISBN: 0-201-63362-0.
- Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 21.4. Advice. page 640: '[2] Avoid data members in base classes intended as interfaces'
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.

This page has been created by the tool CodeToHtml