17 std::vector<double> v;
20 for (
double x = 0; x < 1; x += 0.23) {
26 for (
auto itr = v.begin(); itr != v.end(); itr++) {
27 std::cout << *itr <<
",";
29 std::cout << std::endl;
33 for (
const auto &x : v) {
34 std::cout << x <<
",";
37 std::cout << std::endl;
45 std::vector<double> v1(9);
48 std::iota(v1.begin(), v1.end(), -4);
50 for (
const auto &x : v1) {
51 std::cout << x <<
",";
53 std::cout << std::endl;
59 std::reverse(v2.begin(), v2.end());
62 auto outitr = std::ostream_iterator<double>(std::cout,
",");
63 std::copy(v1.begin(), v1.end(), outitr);
64 std::cout << std::endl;
65 std::copy(v2.begin(), v2.end(), outitr);
66 std::cout << std::endl;
69 auto val = std::accumulate(v1.begin(), v1.end(), 0);
70 std::cout << val << std::endl;
73 auto val1 = std::inner_product(v1.begin(), v1.end(), v2.begin(), 0);
74 std::cout << val1 << std::endl;
void ex1()
ex1 Anwendung von Algorithmen auf einen Container
void ex0()
ex0 Speicherung von Daten in einem Container