diff --git a/CM2005 Object Oriented Programming/Topic 4/4.4.11/OrderBookEntry.h b/CM2005 Object Oriented Programming/Topic 4/4.4.11/OrderBookEntry.h index 55462c3..cdfc0bc 100644 --- a/CM2005 Object Oriented Programming/Topic 4/4.4.11/OrderBookEntry.h +++ b/CM2005 Object Oriented Programming/Topic 4/4.4.11/OrderBookEntry.h @@ -15,6 +15,10 @@ class OrderBookEntry OrderBookType _orderType); static OrderBookType stringToOrderBookType(std::string s); + static bool compareByTimestamp(OrderBookEntry& entry1, OrderBookEntry& entry2) + { + return entry1.timestamp < entry2.timestamp; + } double price; double amount;