Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Filini

macrumors newbie
Original poster
Jan 17, 2009
25
0
Hi All, I have simple program in C:
Code:
#include <stdio.h>		

void myprint();

main()							
{						
 myprint();   	
}

void myprint()
{
printf("Hello\n");	
}

How I can do it in Objective-C???
I can't understand, how convert this peace of code in Objective-C

Thx for help
 
Code:
#import <Foundation/Foundation.h>

@class Filini;

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];


    [Filini myPrint];
    [pool drain];
    return 0;
}

@interface Filini : NSObject {}
+ (void) myPrint;
@end

@implementation Filini

+ (void) myPrint {
	NSLog(@"Hello\n");
}

@end

i've been drinking.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.