summaryrefslogtreecommitdiff
path: root/2p16-2p17.cpp
diff options
context:
space:
mode:
Diffstat (limited to '2p16-2p17.cpp')
-rw-r--r--2p16-2p17.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/2p16-2p17.cpp b/2p16-2p17.cpp
new file mode 100644
index 0000000..8a7b8eb
--- /dev/null
+++ b/2p16-2p17.cpp
@@ -0,0 +1,28 @@
+#include <iostream>
+#include "sales_item.hpp"
+
+/*
+ *
+ * 2.16, 2.17
+ *
+ *
+ */
+
+int main () {
+
+ int i = 0, &r1 = i;
+ double d = 0, &r2 = d;
+
+ r2 = 3.14159; // Valid
+ r2 = r1; // Invalid
+ i = r2; // Invalid
+ r1 = d; // Invalid
+ //All valid?
+ std::cout << " ";
+ int u = 0;
+ int &ru = u;
+ u = 5;
+ ru = 10;
+ std::cout << u << " " << ru << std::endl;
+ return 0;
+}