User Tools

Site Tools


cpp:copy_constructors

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
cpp:copy_constructors [2020/04/14 15:35] – [Άλλη περίπτωση κλήση Copy Constructor] gthanoscpp:copy_constructors [2020/04/14 16:00] – [Μια πιο σύνθετη περίπτωση] gthanos
Line 222: Line 222:
     Rectangle();     Rectangle();
     ~Rectangle();     ~Rectangle();
-    Rectangle(Rectangle &r); 
     void setWidth(int w);     void setWidth(int w);
     void setHeight(int h);     void setHeight(int h);
Line 271: Line 270:
  
 int main() { int main() {
-  Point p{10,5};+  Point p{5,5};
   Rectangle r1{5,6,p};     Rectangle r1{5,6,p};  
   Rectangle r2 = r1;   Rectangle r2 = r1;
 +  Rectangle r3(r1);
      
   moveOrigin(r1, 1,-1);   moveOrigin(r1, 1,-1);
cpp/copy_constructors.txt · Last modified: 2022/05/12 19:41 by gthanos