diff options
author | Oskar <[email protected]> | 2024-08-11 20:59:53 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-08-11 20:59:53 +0200 |
commit | 06615448f1fd8378817e8ef72b5347ae3f0c3577 (patch) | |
tree | fc89a7edaee13953211d006a9c1a428dd279247c /array-test.cpp | |
parent | b45c0d29ee690c8b436a33581d3b108e6064b5a7 (diff) |
more
Diffstat (limited to 'array-test.cpp')
-rw-r--r-- | array-test.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
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 <iostream> +#include <vector> +#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; +} |