#include void IOStream::print(const char* str) { if (term == 0) return; term->print(str); } void IOStream::printf(const char* fmt, ...) { if (term == 0) return; va_list ap; va_start(ap, fmt); term->vprintf(fmt, ap); va_end(ap); } String IOStream::readln() { if (term == 0) return ""; return term->readln(); }