#include #include #include "RawReader.h" int main() { RawReader<10, 5> reader(0, "> "); while(reader.canRead()) { // simulate work between reads std::cout << "Work 1\n"; reader.updateLine(); usleep(50000); std::cout << "Work 2\n"; const char* s = reader.readLine(); if(s != nullptr) { std::cout << s << "\n"; if(strcmp(s, "q") == 0) { break; } } } return 0; }