Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (23 sloc) 544 Bytes
#import <Foundation/Foundation.h>
@interface PZMailMessage : NSObject {
NSString *message;
NSString *recipient;
}
@end
@implementation PZMailMessage
- (id)initWithString:(NSString *)string recipient:(NSString *)aRecipient {
message = string;
recipient = aRecipient;
return self;
}
- (void)deliver {
NSLog(@"Are you %@?", recipient);
NSLog(@"%@", message);
}
@end
int main() {
PZMailMessage *msg = [[PZMailMessage alloc] initWithString:@"My message" recipient:@"John smith"];
[msg deliver];
[msg release];
return 0;
}
Jump to Line
Something went wrong with that request. Please try again.