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

Shows how to use xtd::console::in stream.

#include <xtd/console>
using namespace xtd;
auto main() -> int {
console::write("Hello ");
console::write_line("World!");
console::write("Enter your name: ");
string name = console::read_line();
console::write("Good day, ");
console::write(name);
console::write_line("!");
}
// This code produces the following output :
//
// Hello World!
// Enter your name: James
// Good day, James!
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10