next up previous contents
Next: Arrays of classes Up: Some basics of object-oriented Previous: Encapsulation   Contents

Constructors

``new ...'' is also called ``calling a constructor''. In the above example, we have not defined what the constructor does; for this case, C++ provides a so-called default constructor. One can re-define the constructor, and one can even call it with arguments. Although that feature can lead to more robust code, we will not use it here.4.2



2004-02-02