 <p>Constructors are used to generate the "default" values in an object.<br> Once created, however, "getters" and "setters" are simply methods that allow you to access private members of that object. They're named as such because one name their methods <code>getValue()</code> to get a private variable named value from an object or <code>setValue(int)</code> to set it.</p> <p>It is often also convenient to do error-checking in these methods, and to call a selection of "setters" in the constructor to save on code or easily create multiple constructors.</p> <p>Here is an example:</p> <pre><code>class MyClass { private: int value; public: MyClass(int); void setValue(int); int getValue(); }; MyClass::MyClass(int _value) { setValue(_value); // pass to "setter" } void MyClass::setValue(int _value) { if (_value &gt; 0) // error-checking here value = _value; else value = 0; } int MyClass::getValue() { return value; } </code></pre>