Original Post
I''m trying to read this source code, but I''m somewhat unfamiliar with some of the style/techniques used, due primarily to a chronic case of newbieness (on my part, obviously).
My class definition for CMain contains
private:
// Force the calling of a constructor, but because it is private, it cannot be allocated on the stack.
// You must use "getInstance" to gain an instance
CMain () {} ;
static CMain m_instance
main.cpp contains this here little statement
// Our only instance of the CMain-class CMain CMain::m_instance ;Am I to understand that this statement is declaring the static member m_instance to be a an object of the class CMain? You can set a static member''s value without an actual object by simply using the class name? Is it some sort of special exception that code outside of CMain''s functions is able to modify the value of CMain::m_instance despite it being private? Thanks in advance