Add using a class

This commit is contained in:
Lev
2021-05-20 12:35:02 -05:00
parent ff3a07f9d2
commit 6c71130f17
2 changed files with 31 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,31 @@
#include <iostream>
#include <string>
#include <vector>
enum class OrderBookType
{
bid,
ask
};
class OrderBookEntry
{
public:
double price;
double amount;
std::string timestamp;
std::string product;
OrderBookType orderType;
};
int main()
{
OrderBookEntry order1;
order1.price = 10000;
order1.amount = 0.002;
order1.timestamp = "2020/03/17 17:01:24.884492";
order1.product = "BTC/USDT";
order1.orderType = OrderBookType::bid;
std::cout << order1.price << std::endl;
}