xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
block_scope.cpp
Shows how to use xtd::block_scope class.
#include <xtd/xtd>
auto
main() ->
int
{
block_scope_
(
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
block_scope_
#define block_scope_
The specified expression is cleared automatically when the scope is ended.
Definition
block_scope.hpp:37
Generated on
for xtd by
Gammasoft
. All rights reserved.