xtd 0.2.0
Loading...
Searching...
No Matches

◆ in

std::istream xtd::console::in
static

Gets the standard input stream. A std::basic_istream<char_t> that represents the standard input stream.

Examples
The following sample illustrates the use of the in property.
#include <xtd/console>
#include <xtd/environment>
using namespace xtd;
auto main() -> int {
auto& is = console::in;
auto& os = console::out;
os << "Ola Mundo!" << environment::new_line;
os << "What is your name: ";
auto name = string::empty_string;
is >> name;
os << "Buenos Dias, " << name << environment::new_line;
}
// This code produces the following output :
//
// Ola Mundo!
// What is your name: James
// Buenos Dias, James!
static const basic_string empty_string
Represents the empty basic_string.
Definition basic_string.h:124
static std::istream in
Gets the standard input stream. A std::basic_istream<char_t> that represents the standard input strea...
Definition console.h:47
static std::ostream out
Gets the standard output stream. A std::basic_ostream<char_t> that represents the standard output str...
Definition console.h:52
static xtd::string new_line() noexcept
Gets the newline string defined for this environment.
bool is(std::any value)
Checks if the result of an expression is compatible with a given type.
Definition is.h:365
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10