diff options
Diffstat (limited to 'pointertest.cpp')
-rw-r--r-- | pointertest.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
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 <iostream> +#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; +} |