This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sstream> | |
#include <fstream> | |
#include <iostream> | |
#include <array> | |
class Buffer : public std::streambuf { | |
// we use ifstream here only for the sake of example | |
std::ifstream file; | |
std::array<char, 1024> data; | |