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.)