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

Shows how to use xtd::using class.

#include <xtd/console>
#include <xtd/environment>
#include <xtd/using>
using namespace xtd;
auto main() -> int {
using_(auto values = {1, 2, 3, 4, 5})
console::write_line(string::join(", ", values));
// uncomment next line cause build error with undeclared identifier 'values'.
// console::out << string::join(", ", values) << environment::new_line;
}
// This code produces the following output :
//
// 1, 2, 3, 4, 5
#define using_(...)
The specified expression is cleared automatically when the scope is ended.
Definition using.hpp:33
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10