Files
gpd-925-en/CPlusPlus/Classes/IComparable.h
T
2026-09-29 22:09:02 +02:00

23 lines
472 B
C++

//
// Created by David Hackbarth on 22.09.26.
//
#ifndef CLASSES_ICOMPARABLE_H
#define CLASSES_ICOMPARABLE_H
#include <iostream>
using namespace std;
class IComparable
{
public:
// only for demonstration purposes
IComparable() { cout << "IComparable constructor called" << endl; }
virtual ~IComparable() { cout << "IComparable destructor called" << endl; }
virtual int compareTo(const IComparable& other) const = 0;
};
#endif //CLASSES_ICOMPARABLE_H