// FileViewer.h #ifndef _FileViewer_h_ #define _FileViewer_h_ #include #include #include #include "Buffer.h" const char clear_command[] = "cls"; // for Windows //const char clear_command[] = "clear"; // for Linux and macOS class FileViewer { public: void run(); private: void display(); void execute_command(char command, bool & done); void print_error(const std::string& message); Buffer buffer_; int window_height_; }; inline void FileViewer::print_error(const std::string& message) { using namespace std; cout << "ERROR: " << message << endl << "Press enter to continue...\n"; cin.get(); } #endif