From 642720852ec17b68d8d2bbad300202604c0bb63d Mon Sep 17 00:00:00 2001 From: Oskar Date: Tue, 30 Jul 2024 17:01:04 +0200 Subject: more exercises --- 2p30-2p31.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 2p30-2p31.cpp (limited to '2p30-2p31.cpp') diff --git a/2p30-2p31.cpp b/2p30-2p31.cpp new file mode 100644 index 0000000..eecbdbd --- /dev/null +++ b/2p30-2p31.cpp @@ -0,0 +1,30 @@ +#include +#include "sales_item.hpp" + +/* + * + * 2.30, 2.31 + * + * + */ + +int main () { + //int i; + //const int v2 = 0; // top level ?? + //int v1 = v2; + //int *p1 = &v1, &r1 = v1; + //const int *p2 = &v2, *const p3 = &i, &r2 = v2; // p2 low level + // p3 top level ?? and low level?? + // r2 low level ? + //r1 = v2; low level + //p1 = p2; low level? + //p1 = p3; no? + //p2 = p1; ok? + //p2 = p3; ok? + int v1 = 2; + const int v2 = 0; + int &r = v1; + r = v2; + std::cout << r << std::endl; + return 0; +} -- cgit v1.2.3