Saturday, August 29, 2009

ur first basic program

// First program example


#import Foundation/Foundation.h> //header file


int main (int argc, const char * argv[]) //main program
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // memory management
NSLog (@”Programming is fun!”); //print statement
[pool drain]; //release memory
return 0; //return type
}


how to compile :
***********************************************************************
You can both compile and run your program using
Xcode, or you can use the GNU Objective-C compiler in a Terminal window. on Mac os

These tools should be preinstalled on all Macs that came with OS X.
If you separately installedOS X, make sure you install the Developer Tools as well.


and u can even compile under windows also.




















No comments:

Post a Comment