aboutsummaryrefslogtreecommitdiff
path: root/main.m
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-10-01 21:08:06 +1300
committerArslaan Pathan <[email protected]>2026-10-01 21:08:06 +1300
commitbecb04fe6ed2e2000a63250d1ae13e42a8aa668c (patch)
treeea79fdf45ac7115dd46fde3c77a4e5f4b4bb03ac /main.m
downloadobjc-test-becb04fe6ed2e2000a63250d1ae13e42a8aa668c.tar.xz
objc-test-becb04fe6ed2e2000a63250d1ae13e42a8aa668c.zip
Initial commit
Diffstat (limited to 'main.m')
-rw-r--r--main.m22
1 files changed, 22 insertions, 0 deletions
diff --git a/main.m b/main.m
new file mode 100644
index 0000000..c5bf125
--- /dev/null
+++ b/main.m
@@ -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;
+}