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

Shows how to use xtd::console::read_line method.

#include <xtd/console>
#include <xtd/environment>
using namespace xtd;
auto main() -> int {
console::out << "Hello ";
console::out << "World!" << environment::new_line;
console::out << "Enter your name: ";
string name;
console::in >> name;
console::out << "Good day, ";
console::out << name;
console::out << "!" << environment::new_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.hpp:10