diff --git a/cpp/includes/Example.hpp b/cpp/includes/Example.hpp index 863c983..84b425d 100644 --- a/cpp/includes/Example.hpp +++ b/cpp/includes/Example.hpp @@ -4,9 +4,11 @@ #include struct Example { - Example(); // constructor - Example(const Example &); // copy constructor - virtual ~Example(); // destructor + Example(); // constructor + virtual ~Example(); // destructor + + Example(const Example &); // copy constructor + Example &operator=(const Example &); // copy assignement }; #endif diff --git a/cpp/src/Example.cpp b/cpp/src/Example.cpp index 8204877..13f7c03 100644 --- a/cpp/src/Example.cpp +++ b/cpp/src/Example.cpp @@ -2,6 +2,8 @@ Example::Example() { std::cout << "Hello, world!\n"; } +Example::~Example() {} + Example::Example(const Example &) {} -Example::~Example() {} +Example &Example::operator=(const Example &src) { return *this; }