• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Struggling with basics of Objective C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Struggling with basics of Objective C


  • Subject: Struggling with basics of Objective C
  • From: John Hopkins <email@hidden>
  • Date: Sun, 6 Mar 2005 20:47:22 +0000

Hi Im new to all this and have had a few successes in making my programming do what I want it to do. Yet I am struggling with some of the basic stuff. ANSI C for example I can add two integers together quite simply. However in OBjC when I recall two integers from an array and assign them to a variable I keep getting the following warning message: assignment makes pointer from integer without a cast. What does it mean? How do I make it right? Please forgive my dimness I'm quite new to all this.

inputArray = [[NSMutableArray alloc] initWithCapacity:7];

x = [[sender selectedCell] tag];
[inputArray insertObject:[NSNumber numberWithInt:x] atIndex:0];

num1 = [inputArray objectAtIndex:0];
num2 = [inputArray objectAtIndex:1];
answer = num1 + num2;

John
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Struggling with basics of Objective C
      • From: John Pannell <email@hidden>
    • Re: Struggling with basics of Objective C
      • From: Ed Baskerville <email@hidden>
  • Prev by Date: Re: header files in application bundle
  • Next by Date: Re: Struggling with basics of Objective C
  • Previous by thread: Re: header files in application bundle
  • Next by thread: Re: Struggling with basics of Objective C
  • Index(es):
    • Date
    • Thread