20 years, 9 months ago
Highlights
Community contributions featured20 years, 9 months ago
The difference between a POD and a class is that a class enforces rules (commonly called invariants) on its data, whereas a POD is simply a container for data. A class also…
20 years, 9 months ago
Quote:most member functions can be written as nonmember nonfriend by moving member variables to parametersIf they really can be, then they shouldn't be fields. If you read his d…
20 years, 9 months ago
20 years, 9 months ago
You should also do:for(; iter != m_objectList.end(); iter++)instead of:for(; iter < m_objectList.end(); iter++)Since comparing iterators using < is not guaranteed to work.
20 years, 9 months ago
Latest Activity
See all in DiscussionsThe difference between a POD and a class is that a class enforces rules (commonly called invariants) on its data, …
20 years, 9 months ago
Quote:most member functions can be written as nonmember nonfriend by moving member variables to parametersIf they really can be, then …
20 years, 9 months ago
You should also do:for(; iter != m_objectList.end(); iter++)instead of:for(; iter < m_objectList.end(); iter++)Since comparing iterators using < is not guaranteed …
20 years, 9 months ago