int main() { Scales_data item; std::string null_book = "9-999-99999-9"; item.combine(null_book); print(std::cout, item) << std::endl; constexpr Debug io_sub(false, true, false); if (io_sub.any()) std::cerr << "print appropriate error messages" << std::endl; constexpr Debug prob(false); if (prob.any()) std::cerr << "print an error messages" << std::endl; // Scales_data total(std::cin); std::string null_book("abc"); // Scales_data item = null_book; // explicit Scales_data(std::string) cause error Scales_data item; item.combine(Scales_data(null_book)); item.combine(static_cast<Scales_data>(std::cin)); Screen myScreen(5, 3, '$'); const Screen blank(5, 3, '0'); myScreen.move(1, 3).set('#').display(std::cout); blank.display(std::cout); std::cout << std::endl; Window_mgr my_windows({myScreen, blank}); my_windows.display(); my_windows.clear(0); my_windows.display(); Screen::pos ht(24), wd(80); Screen scr(ht, wd, ' '); Screen *p = &scr; char c = scr.get(); c = p->get(); std::cout << c << std::endl; }
static int test_sales_data() { // Sales_data data(cin); // print(cout, data); X2 x2(5); x2.print(); X2 x2_default; x2_default.print(); constexpr Debug d; constexpr int c_i = d.any(); return 0; }