Algorithmen_Datenstrukturen/Uebung 5/Uebung5_2/CashInstance.h

16 lines
394 B
C++

#pragma once
class CashInstance {
public:
float value;
int availableAmount;
void print();
CashInstance(float value, int availableAmount)
: value(value), availableAmount(availableAmount){};
bool operator<(const CashInstance &other) const {
return this->value < other.value;
}
bool operator>(const CashInstance &other) const {
return this->value > other.value;
}
};