add smart pointers

add polymorphism
add destructor & copy constructor
add pointer-pointer
This commit is contained in:
2025-09-22 18:22:03 +02:00
parent d8f6014fab
commit 3b35b973c9
13 changed files with 208 additions and 7 deletions
+13
View File
@@ -0,0 +1,13 @@
#pragma once
// only for demonstration
#include <iostream>
class ICompareable
{
public:
ICompareable() { std::cout << "ICompareable::ICompareable()" << std::endl; } // only for demonstration
virtual ~ICompareable() { std::cout << "ICompareable::~ICompareable()" << std::endl; } // only for demonstration
virtual int Compare(ICompareable* pOther) = 0;
};