Jump to content

C++ Language/Objects/ConstMembers/ConstDataMembers

From Wikibooks, open books for an open world

For data members that are constants or references, you must initialize them in a constructor's "initializer-list", which is written as CRType(int x) : m_iMember(x) {body}.

Additional information about const data members