add pointer in classes
add interfaces
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
// only for demonstration
|
||||
#include <iostream>
|
||||
|
||||
class ICompareable
|
||||
{
|
||||
public:
|
||||
ICompareable() { std::cout << "ICompareable::ICompareable()" << std::endl; } // constructor, only for demonstration
|
||||
virtual ~ICompareable() { std::cout << "ICompareable::~ICompareable()" << std::endl; } // destructor
|
||||
|
||||
virtual bool Compare(const ICompareable* pOther) = 0; // pure virtual - abstract method
|
||||
};
|
||||
Reference in New Issue
Block a user