<<< | Index | >>> |
Objects will be more useful if:
we can control the semantics of instantiation (read: declaring) them.
The goal is to provide the client with objects which are always in a good (or at least identifiably bad) state:
#include "point.h" void main() { Point pt( 5, 10 ); // construct object with initial values }
<<< | Index | >>> |