summaryrefslogtreecommitdiff
path: root/vec-arr-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vec-arr-test.cpp')
-rw-r--r--vec-arr-test.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/vec-arr-test.cpp b/vec-arr-test.cpp
new file mode 100644
index 0000000..fcfdb1f
--- /dev/null
+++ b/vec-arr-test.cpp
@@ -0,0 +1,30 @@
+#include <iostream>
+#include <vector>
+#include <iterator>
+#include "sales_data.hpp"
+#include "sales_item.hpp"
+
+/*
+ *
+ *
+ *
+ *
+ */
+
+int main () {
+
+ int arr[] = {1,43,47,3465,3,553,2,667,31};
+ std::vector<int> varr1(std::begin(arr), std::end(arr));
+ std::vector<int> varr2(arr+0, arr+9);
+ for(auto a : varr1) {
+ std::cout << a << " ";
+ }
+
+ std::cout << std::endl;
+ for(auto a : varr2) {
+ std::cout << a << " ";
+ }
+
+ std::cout << std::endl;
+ return 0;
+}