aboutsummaryrefslogtreecommitdiff
path: root/main.m
diff options
context:
space:
mode:
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;
+}