diff options
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; +} |