12 lines
291 B
C++
12 lines
291 B
C++
#include <istream>
|
|
#include <cstdint>
|
|
#include "inputDevice.h"
|
|
|
|
InputDevice::InputDevice(std::istream& input): in(input){}; //konstruktor
|
|
|
|
uint8_t InputDevice::read() { //metoda read
|
|
int c = in.get();
|
|
if (c == EOF) return 0;
|
|
else return static_cast<uint8_t>(c);
|
|
}
|
|
|