title: How to assign NSArray data to NSMutableArray in iphone?
body: <p>In my application I have an NSArray which contains some data. I want to take that data and put it into an <code>NSMutableArray</code> called <code>subArrayData</code>. I am able to insert the data from my first array into the mutable array, but when the application runs I am getting: </p>
  
  <blockquote>
    <p>warning:Incompatible pointer types assigning to 'nsmutablearray *'
    from 'nsarray *' please help out.</p>
  </blockquote>
  
  <p>following is my code:
  .h file</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface AddNew : UIViewController
  {
      NSMutableArray *subArrayData;;
  }
  @property(nonatomic ,retain)NSMutableArray *subArrayData;
  </code></pre>
  
  <p>.m file</p>
  
  <pre><code>#import "AddNew.h"
  #import "DashBoardPage.h"
  #import "SubmitYourListing.h"
  
  
  @implementation AddNew
  
  @synthesize subArrayData;
  
  -(void)accommodationAndTravel
  {
      subArrayData =[[NSArray alloc] initWithArray:[NSArray arrayWithObjects:@"Select one",@"Accommodation and travel hospitality",@"Apartments and villas",@"Bed and Breakfast",@"Caravan parks and campsites",@"Hospitality",
                                                    @"Hotels and Motels",@"Snow and Ski lodges",@"Tourist attractions and tourism information",@"Tours and Holidays",@"Travel agents and Services",nil]];
  
  
  }
  </code></pre>