User Tools

Site Tools


cpp:object_creation

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
cpp:object_creation [2020/04/08 14:35] – [Δημίουργία αντικείμένων στο Heap] gthanoscpp:object_creation [2020/04/14 07:56] gthanos
Line 19: Line 19:
     void setHeight(int h);     void setHeight(int h);
 }; };
 +</code>
 +
 +<code cpp Rectangle.cpp>
 +#include "Rectangle.hpp"
  
 Rectangle::Rectangle(int w, int h): width(w), height(h) { Rectangle::Rectangle(int w, int h): width(w), height(h) {
Line 41: Line 45:
  
 <code cpp RectangleUsage.cpp> <code cpp RectangleUsage.cpp>
 +#include "Rectangle.hpp"
 +
 int main() { int main() {
   Rectangle rect1(3,4);   Rectangle rect1(3,4);
cpp/object_creation.txt · Last modified: 2021/05/07 06:22 (external edit)