Skip to content

Commit

Permalink
Added the Objective-C support directory (4 files)
Browse files Browse the repository at this point in the history
Added the Objective-C support directory, containing 4 files in Objective-C format.
  • Loading branch information
seanpm2001 authored Nov 27, 2021
1 parent 3b1ebc3 commit b7a6ebb
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This is a single line comment
/* This is
a multi-li
ne comment
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This is a single line comment
/* This is
a multi-li
ne comment
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#import <Foundation/Foundation.h>

@interface SampleClass:NSObject
- (void)sampleMethod;
@end

@implementation SampleClass

- (void)sampleMethod {
NSLog(@"Hello, World! \n");
}

@end

int main() {
/* my first program in Objective-C */
SampleClass *sampleClass = [[SampleClass alloc]init];
[sampleClass sampleMethod];
return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#import <Foundation/Foundation.h>

@interface SampleClass:NSObject
- (void)sampleMethod;
@end

@implementation SampleClass

- (void)sampleMethod {
NSLog(@"Hello, World! \n");
}

@end

int main() {
/* my first program in Objective-C */
SampleClass *sampleClass = [[SampleClass alloc]init];
[sampleClass sampleMethod];
return 0;
}

0 comments on commit b7a6ebb

Please sign in to comment.