Constructing and destructing dynamic objects

Nasza ocena:

3
Wyświetleń: 266
Komentarze: 0
Notatek.pl

Pobierz ten dokument za darmo

Podgląd dokumentu
Constructing and destructing dynamic objects - strona 1

Fragment notatki:

Constructing and destructing dynamic objects point *pp0=new point; point *pp1=new point(1.0); point *pp2=new point(10.0, 20.0); point *arrPoints=new point[10]; // array of 10 points // initialized with the default constructor // in order of increasing addresses // new T[] - calls only the default constructor delete pp1; delete pp2; delete pp0; delete [] arrPoints; ... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz