From 642720852ec17b68d8d2bbad300202604c0bb63d Mon Sep 17 00:00:00 2001 From: Oskar Date: Tue, 30 Jul 2024 17:01:04 +0200 Subject: more exercises --- pointertest.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 pointertest.cpp (limited to 'pointertest.cpp') diff --git a/pointertest.cpp b/pointertest.cpp new file mode 100644 index 0000000..2a2210d --- /dev/null +++ b/pointertest.cpp @@ -0,0 +1,21 @@ +#include +#include "sales_item.hpp" + +/* + * + * Description + * + * + */ + +int main () { + + int val = 929992; + int *pi = nullptr; + int **pi2 = nullptr; + pi = &val; + pi2 = π + std::cout << &pi << " " << pi2 << std::endl; + std::cout << val << " " << *pi << " " << **pi2 << std::endl; + return 0; +} -- cgit v1.2.3