Advertisement
RobertDeMilo

RB4.8 Внутреннее устройство массива

Apr 25th, 2024
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. //#include "profile.h"
  2. #include <iostream>
  3. #include <array>
  4. #include <algorithm>
  5. #include <tuple>
  6. #include <vector>
  7.  
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12.     int x = 111111;
  13.  
  14.     array<int,10> numbers;
  15.  
  16.     numbers.fill(8);
  17.  
  18.     const auto numbers_copy = numbers;
  19.  
  20.     int y = 222222;
  21.  
  22.     //  for(int*p =&y; p<= &x;++p)
  23.     //  {
  24.     //      cout<<*p<<" ";
  25.     //  }
  26.  
  27.     for(int x:numbers_copy)
  28.     {
  29.         cout<<x<<" ";
  30.     }
  31.     cout<<"\n";
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement