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

Shows how to use xtd::console::in and xtd::console::out streams.

#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!
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10