xtd 0.2.0
console_title.cpp

Shows how to use xtd::console::title method.

#include <xtd/console>
using namespace xtd;
auto main() -> int {
console::write_line("The current console title is: \"{0}\"", console::title());
console::write_line(" (Press any key to change the console title.)");
console::title("The title has changed!");
console::write_line("Note that the new console title is \"{0}\"\n"
" (Press any key to quit.)", console::title());
}
// This code produces the following output :
//
// The current console title is: "Command Prompt - console_title"
// (Press any key to change the console title.)
// Note that the new console title is "The title has changed!"
// (Press any key to quit.)
static console_key_info read_key()
Obtains the next character or function key pressed by the user. The pressed key is displayed in the c...
static xtd::string title()
Gets the title to display in the console title bar.
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8