xtd 0.2.0
wconsole.cpp

Shows how to use xtd::console class.

#include <xtd/console>
using namespace xtd;
auto main() -> int {
console::write(L"Hello ");
console::write_line(L"World!");
console::write(L"Enter your name: ");
string name = console::read_line();
console::write(L"Good day, ");
}
// This code produces the following output :
//
// Hello World!
// Enter your name: James
// Good day, James!
static xtd::string read_line()
Reads the next line of characters from the standard input stream.
static void write(arg_t &&value)
Writes the text representation of the specified value to the standard output stream.
Definition console.hpp:462
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