■
#import <Foundation/Foundation.h> @interface myClass : NSObject { @public int age; int height; } @end @implementation myClass -(void) view { NSLog(@"person=[%d][%d]",age,height); } @end int main(int argc, const char * argv[]) { @autoreleasepool { myClass *personA = [[myClass alloc] init]; myClass *personB = [[myClass alloc] init]; personA->age = 5; personA->height = 150; personB->age = 10; personB->height = 180; [personA view]; [personB view]; } return 0; }