summaryrefslogtreecommitdiff
path: root/3p19.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-08-07 22:39:51 +0200
committerOskar <[email protected]>2024-08-07 22:39:51 +0200
commit9b931cfed1551961c8bbb93b21051104c0c4c716 (patch)
tree9232cc1246d35db36b0800e3d4af318f4e3905c9 /3p19.cpp
parent601e9571981ef44984e740ba71ce1648dbc223d3 (diff)
more exercises
Diffstat (limited to '3p19.cpp')
-rw-r--r--3p19.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/3p19.cpp b/3p19.cpp
new file mode 100644
index 0000000..1d659c9
--- /dev/null
+++ b/3p19.cpp
@@ -0,0 +1,38 @@
+#include <iostream>
+#include <vector>
+#include "sales_data.hpp"
+#include "sales_item.hpp"
+
+/*
+ *
+ * 3.19
+ *
+ *
+ */
+
+using std::string;
+using std::cout;
+using std::cin;
+using std::cerr;
+using std::clog;
+using std::endl;
+using std::vector;
+int main () {
+
+ vector<int> ivec1(10, 42);
+ vector<int> ivec2{42, 42, 42, 42, 42, 42, 42, 42, 42, 42};
+ vector<int> ivec3;
+ for(decltype(ivec3.size()) i = 0 ; i < 10 ; i++) {
+ ivec3.push_back(42);
+ }
+
+ vector<vector<int>> vecivec = {ivec1, ivec2, ivec3};
+ for(auto &vv : vecivec) {
+ for(auto &iv : vv) {
+ cout << iv << " ";
+ }
+ cout << endl;
+ }
+
+ return 0;
+}