From 2ecf623735023e8fc2a4029e4653f0bd591e6052 Mon Sep 17 00:00:00 2001 From: Oskar Date: Sat, 10 Aug 2024 23:07:32 +0200 Subject: more --- iterator-test-2.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 iterator-test-2.cpp (limited to 'iterator-test-2.cpp') diff --git a/iterator-test-2.cpp b/iterator-test-2.cpp new file mode 100644 index 0000000..7b6d791 --- /dev/null +++ b/iterator-test-2.cpp @@ -0,0 +1,29 @@ +#include +#include +#include "sales_data.hpp" +#include "sales_item.hpp" + +/* + * + * Just a little test, had to clear something up in my head + * + * + * + */ + +using std::string; +using std::cout; +using std::cin; +using std::cerr; +using std::clog; +using std::endl; +using std::vector; +int main () { + + vector nums = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}; + auto iter = nums.begin(); + iter += 10; + cout << "nums content: " << *iter << endl; + cout << "subscr content: " << nums[10] << endl;; + return 0; +} -- cgit v1.2.3