Shows how to use xtd::console::cursor_size property.
#include <xtd/console>
auto main() -> int {
auto m0 = "This example increments the cursor size from 1% to 100%:\n";
auto m1 = "Cursor size = {0}%. (Press any key to continue...)";
auto sizes = { 1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
auto save_cursor_size = console::cursor_size();
console::write_line(m0);
for (
auto size : sizes) {
console::cursor_size(
size);
console::write_line(m1,
size);
console::read_key();
}
console::cursor_size(save_cursor_size);
}
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10