summaryrefslogtreecommitdiff
path: root/7p52.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-10-02 11:23:38 +0200
committerOskar <[email protected]>2024-10-02 11:23:38 +0200
commit3edb35c6cab27d36f0fde49726db8cc9289e7304 (patch)
treedb59c3d208843079f462f4df63ffeec1d2fe4897 /7p52.cpp
parent18236447ae6c08ff336fd22d191343a1ff9dfede (diff)
more
Diffstat (limited to '7p52.cpp')
-rw-r--r--7p52.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/7p52.cpp b/7p52.cpp
new file mode 100644
index 0000000..be826e7
--- /dev/null
+++ b/7p52.cpp
@@ -0,0 +1,27 @@
+#include <iostream>
+
+/*
+ *
+ * 7.52
+ *
+ *
+ */
+
+struct Sales_data {
+ std::string bookNo;
+ unsigned units_sold = 0;
+ double revenue = 0.0;
+};
+
+int main () {
+
+ Sales_data item = {"978-0590353403", 25, 15.99};
+ std::cout << item.bookNo << "\n"
+ << item.units_sold << "\n"
+ << item.revenue << std::endl;
+
+ // There seems to be no issues
+ // Apparently it refuses to compile if we were to use C++11
+ // I am currently on C++20
+ return 0;
+}