1 /*
2 *
htwg_vector_test.cpp
3 *
4 * Beispiel-Anwendung fuer die stark vereinfachte Vektor-Klasse
5 *
6 * Autor: H.Drachenfels
7 * Erstellt am: 5.6.2024
8 */
9 #include <iostream>
10 #include "htwg_vector.h"
11
12 int main()
13 {
14 htwg::vector<int> v(2);
15 v[0] = 10;
16 v[1] = 20;
17
18 for (std::size_t i = 0; i < v.size(); ++i)
19 {
20 std::cout << v[i] << '\n';
21 }
22
23 const htwg::vector<int>& cv = v;
24 for (std::size_t i = 0; i < cv.size(); ++i)
25 {
26 std::cout << cv[i] << '\n';
27 }
28 }