Compiler generated copy constructor

Nasza ocena:

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

Pobierz ten dokument za darmo

Podgląd dokumentu
Compiler generated copy constructor - strona 1

Fragment notatki:

Compiler generated copy constructor  if programmer does not define a copy constructor - the compiler generates one  other constructors are not important in this case  compiler generated copy constructor copies object field by field - base classes and object members with their copy constructors - just like in case of initialization list it works also when the class has const members  For the point class: point(const point & p) :x(p.x), y(p.y) {} ... zobacz całą notatkę



Komentarze użytkowników (0)

Zaloguj się, aby dodać komentarz