What does a colon following a C++ constructor name do? [duplicate]
This is a member initializer list, and is part of the constructor’s implementation. The constructor’s signature is: MyClass(); This means that the constructor can be called with no parameters. This makes it a default constructor, i.e., one which will be called by default when you write MyClass someObject;. The part : m_classID(-1), m_userdata(0) is called … Read more