Files
UoL/CM2005 Object Oriented Programming/Midterm/Midterm Project/TradingBot.cpp
2021-06-13 17:11:24 -05:00

20 lines
363 B
C++

#include "TradingBot.h"
#include <iostream>
Bot::Bot(std::string filename)
{
orders = CSVReader::readCSV(filename);
Print(20);
}
void Bot::Print(int intLimit)
{
int i = 0;
for (OrderBookEntry &entry : orders)
{
std::cout << entry.product << " " << entry.price << " " << entry.amount << std::endl;
i++;
if (i == intLimit)
break;
}
}