//
// File: helloworld.m
//
// Programmer: Mihalis Tsoukalos
// Date: Friday 21 April 2006
//
// Use: gcc -Wall -lobjc helloworld.m -o helloworld
// to compile it.
#include <objc/Object.h>
@interface Mtsouk:Object
{
// Usually, instance variables are declared here.
// In this example no instance variables
// need to be declared.
[myMtsouk hw];
}
- (void)hw;
@end
#include <stdio.h>
@implementation Mtsouk
- (void)hw
{
printf("Hello, World!\n");
}
@end
#include <stdlib.h>
int main(void)
{
id myMtsouk;
myMtsouk=[Mtsouk new];
[myMtsouk free];
return EXIT_SUCCESS;
}
Did you find the above information helpful? You will find a lot more information in my eBook "Programming Dashboard Widgets". The eBook describes how you can create Apple Dashboard Widgets using many programming languages including JavaScript, Perl, Objective-C, and PHP. You can buy it here.
No comments:
Post a Comment