#include <xtd/xtd>
class example {
public:
static auto main() -> void {
auto input =
array<string> {
"Brachiosaurus",
"Amargasaurus",
"Mamenchisaurus"};
console::write_line("\ncapacity: {0}", dinosaurs.capacity());
console::write_line();
for (auto dinosaur : dinosaurs)
console::write_line(dinosaur);
console::write_line("\nadd_range(dinosaurs)");
dinosaurs.add_range(dinosaurs);
console::write_line();
for(auto dinosaur : dinosaurs)
console::write_line(dinosaur);
console::write_line("\nremove_range(2, 2)");
dinosaurs.remove_range(2, 2);
console::write_line();
for(auto dinosaur : dinosaurs)
console::write_line(dinosaur);
input = {"Tyrannosaurus", "Deinonychus", "Velociraptor"};
console::write_line("\ninsert_range(3, input)");
dinosaurs.insert_range(3, input);
console::write_line();
for(auto dinosaur : dinosaurs)
console::write_line(dinosaur);
console::write_line("\noutput = dinosaurs.get_range(2, 3).to_array()");
auto output = dinosaurs.get_range(2, 3).to_array();
console::write_line();
for (auto dinosaur : output)
console::write_line(dinosaur);
}
};
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.h:71
#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:175
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.h:15
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
std::vector< type_t > array
Definition __array_definition.h:18