Shows how to use xtd::collections::generic::dictionary class.
#include <xtd/xtd>
class example {
public:
static auto main() -> void {
auto open_with = sorted_dictionary<string, string> {};
open_with.insert({"txt", "notepad.exe"});
open_with.insert({"bmp", "paint.exe"});
open_with.insert({"dib", "paint.exe"});
open_with.insert({"rtf", "wordpad.exe"});
auto copy = dictionary<string, string>(open_with.begin(), open_with.end());
console::write_line();
for(const key_value_pair<string, string>& kvp : copy)
console::write_line("key = {0}, value = {1}", kvp.key(), kvp.value());
}
};
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:168