summaryrefslogtreecommitdiff
path: root/2p35.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-07-31 17:09:45 +0200
committerOskar <[email protected]>2024-07-31 17:09:45 +0200
commita450487a18ec72ea3a3815bfaf17b2f701796b6f (patch)
tree67b4cfe127bc5c134f06c06e57ad35629e630b7b /2p35.cpp
parentb7819b597e1241dd98643eeda4c288a341142311 (diff)
more
Diffstat (limited to '2p35.cpp')
-rw-r--r--2p35.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/2p35.cpp b/2p35.cpp
new file mode 100644
index 0000000..ce34e47
--- /dev/null
+++ b/2p35.cpp
@@ -0,0 +1,28 @@
+#include <iostream>
+#include "sales_item.hpp"
+
+/*
+ *
+ * 2.35
+ *
+ *
+ */
+
+int main () {
+
+ const int i = 42; // const int
+ auto j = i; // int
+ const auto &k = i; // const int&
+ auto *p = &i; // pointer to const int? (const int*) or pointer to pointer?
+ auto p2 = &i;
+ const auto j2 = i, &k2 = i;
+ // const int // reference to const int (const int&)
+ std::cout << i << "\n"
+ << j << "\n"
+ << k << "\n"
+ << p << "\n"
+ << p2 << "\n"
+ << j2 << "\n"
+ << k2 << std::endl;
+ return 0;
+}