Advertisement
steamengines

SOURCE static arrays

Apr 21st, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include "genericCDB.h"
  2. #include <iostream>
  3. #include <iomanip>
  4. #include <ctime>
  5. using namespace std;
  6.  
  7.  
  8. int main()
  9. {
  10.     const int SIZE = 5;
  11.     int numbers[SIZE];
  12.     int numbers2[SIZE] = { };
  13.    
  14.     srand(time(NULL));
  15.     for (int i = 0; i < SIZE; i++)
  16.         numbers[i] = rand() % 101;
  17.  
  18.  
  19.  
  20.     displayArray(numbers, SIZE);
  21.  
  22.     cout << endl << endl;
  23.  
  24.     displayArray(numbers, SIZE);
  25.  
  26.     /*cout << &SIZE << endl;
  27.     cout << numbers << endl;
  28.     cout << &numbers[0] << endl;
  29.     cout << numbers2 << endl;
  30.     cout << &numbers2[0]; */
  31.  
  32.     cout << endl << endl;
  33.  
  34.     copyArray(numbers2, numbers, SIZE);
  35.  
  36.     system("pause");
  37.     return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement