title: Accessing Arrays throughout classes xcode
body: <p>In my xcode project, whenever I try using:</p>
  
  <pre><code>#import "Class1.h"
  NSMutableArray *array;
  @implementation Class2
  Class1 *class = [Class1 new];
  array = class.array;
  </code></pre>
  
  <p>Assuming there is something called array in Class1.
  Xcode builds it like there are no errors. However, when I run it, the screen flashes what is on class1 before crashing and giving me an error.
  I fixed some other code. Now the error is:</p>
  
  <pre><code>[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array
  </code></pre>
  
  <p>Sorry, I am new to Obj-C.</p>