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

Shows how to use xtd::startup class.

#include <xtd/console>
#include <xtd/environment>
#include <xtd/startup>
using namespace xtd;
namespace main4_example {
class program {
public:
static int main(const std::vector<ustring>& args) {
// Write arguments to the console output
for (auto arg : args)
console::write_line(arg);
return 42;
}
};
}
startup_(main4_example::program::main);
// Is the same as :
//
// auto main()->int {
// return startup::safe_run(main4_example::program::main);
// }
// This code produces the following output if one two "three four" five are entered on command line:
//
// one
// two
// three four
// five
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.h:166
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10