I am a iPhone beginner and i want to know how many parameters the main function takes.
+1
A:
you generally don't touch the main method.
typically you begin entering your code in your application delegate, specifically:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
isaac
2010-07-23 22:24:17
A:
The main() function is a standard C main(). It takes two parameters:
int main(int argc, char *argv[]) {}
As Isaac notes, usually you will use the main.m provided for you by XCode:
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
Seamus Campbell
2010-08-05 04:07:38