Primeira página Anterior Continuar Última página Sumário Gráfica
C++: Objects
Object initialization and finalization
- constructors:
- same name of class
- no return value (not even void),
can have arguments
- automatic invocation when object is created
- destructors:
- name of the class prefixed by ~
- no return value, no arguments
- automatic invocation when object is destroyed