summaryrefslogtreecommitdiff
path: root/3p18.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3p18.cpp')
-rw-r--r--3p18.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/3p18.cpp b/3p18.cpp
new file mode 100644
index 0000000..a35ff43
--- /dev/null
+++ b/3p18.cpp
@@ -0,0 +1,29 @@
+#include <iostream>
+#include <vector>
+#include "sales_data.hpp"
+#include "sales_item.hpp"
+
+/*
+ *
+ * 3.18
+ *
+ *
+ */
+
+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;
+ vector<int> ivec2(10); // We could initialize it with some elements
+ vector<int> ivec3{42}; // We could initialize it with the first element being 42
+ ivec1.push_back(42); // One way we might fix it
+ ivec2[0] = 42;
+ cout << ivec1[0] << " " << ivec2[0] << " " << ivec3[0] << endl;
+ return 0;
+}