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:
@@ -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;
|
||||
};
|
||||
Reference in New Issue
Block a user