• 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
Newby Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newby Question


  • Subject: Newby Question
  • From: R T <email@hidden>
  • Date: Sat, 9 Jul 2005 17:45:25 -0700 (PDT)

I'm using an array in a class and I'm not sure how to
write the get and set methods...can anyone correct
these lines.

#import <Cocoa/Cocoa.h>

@interface MyArrayClass : NSObject
{
	int anArray[10];
}
- (void)anArray;
- (int)setAnArray:(int)bArray;
@end

___________________________________

#import "MyArrayClass.h"
@implementation MyArrayClass
- (int)anArray {	return anArray;	}
- (int)setAnArray:(int)bArray {	 anArray = bArray;	}
@end


Thanks
Rick T.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 _______________________________________________
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: Newby Question
      • From: Daniel DeCovnick <email@hidden>
    • Re: Newby Question
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: NO future for Cocoa-Java ?
  • Next by Date: Re: "untitled" vs "Untitled"
  • Previous by thread: Re: Drawing lines between text [SOLVED]
  • Next by thread: Re: Newby Question
  • Index(es):
    • Date
    • Thread