summaryrefslogtreecommitdiff
path: root/3p40.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-08-14 19:58:58 +0200
committerOskar <[email protected]>2024-08-14 19:58:58 +0200
commit19f1a70edbf2b08536c114e12f7b3c1e77469730 (patch)
tree1cb1162c8e205cdb2bcddfbcb1d6a09f2d2ff915 /3p40.cpp
parentc5587e2392d55b3e0dc322c0545ead4a314132c0 (diff)
Forgot how painful input buffers are
Diffstat (limited to '3p40.cpp')
-rw-r--r--3p40.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/3p40.cpp b/3p40.cpp
new file mode 100644
index 0000000..0ca64fd
--- /dev/null
+++ b/3p40.cpp
@@ -0,0 +1,24 @@
+#include <iostream>
+#include <vector>
+#include <cstring>
+#include "sales_data.hpp"
+#include "sales_item.hpp"
+
+/*
+ *
+ * 3.40
+ *
+ * Is this overkill?
+ */
+
+int main () {
+
+ char ch1[] = "Hello, ";
+ char ch2[] = "World!";
+ char chfinal[1000];
+ chfinal[0] = '\0';
+ std::strcpy(chfinal, ch1);
+ std::strcat(chfinal, ch2);
+ std::cout << chfinal << std::endl;
+ return 0;
+}