title: How to make a Global Array?
body: <p>So, I read <a href="https://stackoverflow.com/questions/1249131/declaring-global-variables-in-iphone-project">this post</a>, and it's pretty much exactly what I was looking for.  However... it doesn't work.  I guess I'm not going to go with the singleton object, but rather making the array in either a Global.h file, or insert it into the _Prefix file.</p>
  
  <p>Both times I do that though, I get the error:</p>
  
  <p>Expected specifier-qualifier-list before 'static'</p>
  
  <p>and it doesn't work.  So... I'm not sure how to get it to work, I can remove extern and it works, but I feel like I need that to make it a constant.</p>
  
  <p>The end goal is to have this Mutable Array be accessible from any object or any file in my project.  Help would be appreciated! </p>
  
  <p>This is the code for my Globals.h file:</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  static extern NSMutableArray * myGlobalArray;
  </code></pre>
  
  <p>I don't think I need anything in the implementation file.  If I were to put that in the prefix file, the error was the same.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>So, I removed the .m file from Globals, and I just have the code about in Globals.h.  Assuming I am going to continue with this terrible practice of having global variables (I know it's bad, I just want to test this out), I now have a new error.  It says:</p>
  
  <p>"Multiple storage classes in declaration specifiers"</p>
  
  <p>If I remove "extern" it works and if I remove "static" it works, but having both doesn't... what now?</p>
  
  <p>****Double Edit****</p>
  
  <p>Aright, so I've tried adding the array to my UIApplication Delegate, but I'm doing it wrong because it isn't working.  Could someone give me some example code as to where to place it an access it?  I don't know if it should go in the implementation, or somewhere else, and once the array is initialized how to access it from the other files... Do I set a new variable to the array, or something?</p>