diff options
| author | Arslaan Pathan <[email protected]> | 2026-10-01 21:08:06 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-10-01 21:08:06 +1300 |
| commit | becb04fe6ed2e2000a63250d1ae13e42a8aa668c (patch) | |
| tree | ea79fdf45ac7115dd46fde3c77a4e5f4b4bb03ac | |
| download | objc-test-becb04fe6ed2e2000a63250d1ae13e42a8aa668c.tar.xz objc-test-becb04fe6ed2e2000a63250d1ae13e42a8aa668c.zip | |
Initial commit
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | main.m | 22 |
2 files changed, 25 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c985222 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +main +main.d +*.d @@ -0,0 +1,22 @@ +#include <Foundation/Foundation.h> +#include <objc/Object.h> +#include <stdio.h> + +@interface Hello : NSObject +- (void)sayHello; +@end + +@implementation Hello + +- (void)sayHello { + printf("Hello from Objective-C!\n"); +} + +@end + +int main(void) { + Hello *hello = [Hello new]; + [hello sayHello]; + + return 0; +} |
