Last active
August 29, 2015 14:10
-
-
Save neuro-sys/4376f176e8ccea09ef89 to your computer and use it in GitHub Desktop.
First Objective-C Program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface MyClass : NSObject | |
- (void)printHello:(NSString *) name; | |
@end | |
@implementation MyClass: NSObject | |
- (void)printHello:(NSString *) name | |
{ | |
NSLog(@"Hello %@!", name); | |
NSLog(@"This is a second line %@!", name); | |
} | |
@end | |
int main() | |
{ | |
MyClass *myClass = [[MyClass alloc] init]; | |
[myClass printHello: @"Firat"]; | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment