From 06615448f1fd8378817e8ef72b5347ae3f0c3577 Mon Sep 17 00:00:00 2001 From: Oskar Date: Sun, 11 Aug 2024 20:59:53 +0200 Subject: more --- array-test.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 array-test.cpp (limited to 'array-test.cpp') diff --git a/array-test.cpp b/array-test.cpp new file mode 100644 index 0000000..dd58435 --- /dev/null +++ b/array-test.cpp @@ -0,0 +1,32 @@ +#include +#include +#include "sales_data.hpp" +#include "sales_item.hpp" + +/* + * + * + * + * + */ + +using std::string; +using std::cout; +using std::cin; +using std::cerr; +using std::clog; +using std::endl; +using std::vector; +int main () { + + constexpr int isz = 10; + int fff[isz]; + fff[0] = 304234; + cout << fff[0] << endl; + + int arr[] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}; + int (*arr_p)[10] = &arr; + cout << &(*arr_p)[2] << " " << &arr[2] << endl; + // This syntax is crazy! + return 0; +} -- cgit v1.2.3