xtd 0.2.0
Loading...
Searching...
No Matches
hello_world_console3.cpp

The classic first application "Hello, World!" with xtd::console class.

#include <xtd/background_color>
#include <xtd/console>
#include <xtd/environment>
#include <xtd/foreground_color>
#include <xtd/reset_color>
using namespace xtd;
auto main() -> int {
console::out << background_color(console_color::blue) << foreground_color(console_color::white) << "Hello, World!" << reset_color() << environment::new_line;
}
// This code produces the following output with colors :
//
// Hello, World!
Represent background color output manipulator class.
Definition background_color.h:24
Represent foreground color output manipulator class.
Definition foreground_color.h:20
Represent reset color output manipulator class.
Definition reset_color.h:20
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10