add example for "default constructor, copy constructor, destructor, if you need one you'll need all"

add smart pointer
add pointer pointer
This commit is contained in:
2025-03-27 21:37:30 +01:00
parent 4b6ac6a484
commit a557775853
11 changed files with 163 additions and 33 deletions
+7 -1
View File
@@ -1,9 +1,15 @@
#pragma once
// only for presentation
#include <iostream>
class ICompareable
{
public:
virtual ~ICompareable() {}
// only for presentation
ICompareable() { std::cout << "Create IComparable" << std::endl; }
virtual ~ICompareable() { std::cout << "Destroy IComparable" << std::endl; }
virtual int Compare(ICompareable* other) = 0;
};