title: In C++ How to use an atribute from another class
body: <p>So I've got two different classes in C++, </p>
  
  <pre><code>#ifndef A_H
  #define A_H
  
  class A
  {
      public:
          ...
      private:
  
          static const int MAX = 52;
  
          int a_array[MAX];
  
  };
  
  #endif // A_H
  </code></pre>
  
  <p>And I'd like to use that array into another class... But I was wondering if I can't just return an array, how should I do it? Am I forced to create another array in the class B and copy it? </p>
  
  <p>THis would be the second class...</p>
  
  <pre><code>#include "A.h"
  #ifndef B_H
  #define B_H
  
  class B
  {
      public:
          ...
          void createNewDeck("here would be the array, or the object I'd like to input to use the array inside");
      private:
  
          static const int min = 5;
  
  
          int a_array[min]
  
  };
  
  #endif // B_H
  </code></pre>
  
  <p>EDIT: I want them to be different, I'd like to have a B method that works with the A class array. I would have a B method that takes some values from that array; something like this so you guys can get my idea.</p>
  
  <pre><code>void B::createNewDeck(const A &amp;a){
      a_array[0] = a.a_array[5];
      a_array[3] = a.a_array[48];
  }
  </code></pre>
  
  <p>Appreciate your help! </p>