title: Storing segmented control value as variable. How to fix these warnings?
body: <p>I have the following code but I am getting warning "Incompatible integer to pointer conversion assigning to <code>NSInteger</code> <em>(aka int</em>) from int. The <code>qAVariable</code> is an int variable and I am only trying to store whatever value is selected as that variable. Would this work despite the warnings?</p>
  
  <pre><code>- (IBAction)segmentcontrollerA {
  
      if (controlA.selectedSegmentIndex == 0) {
          qAVariable = 0;
      }
      if (controlA.selectedSegmentIndex == 1) {
          qAVariable = 1;
      }
      if (controlA.selectedSegmentIndex == 2) {
          qAVariable = 2;
      }
      if (controlA.selectedSegmentIndex == 3) {
          qAVariable = 3;
      }
      if (controlA.selectedSegmentIndex == 4) {
          qAVariable = 4;
      }
  }
  </code></pre>