object-c学习1

由于公司须要,开始看object-c,虽然还没ios系统,但现学下语法。ios

第一个例子不该该是helloWorld吗?但《Learn Objective-C on the Mac》书上不是。spa

#import <Foundation/Foundation.h>

int main (int argc, const char *crgv[])
{
	NSLog(@"The number from 1 to 5");
	
	int i;
	for(i = 1; i <= 5:i++){
	NSLog(@"%d\n",i);
	}
	
	return (0);
}

  恩,没办法看结果,不过很简单。blog

相关文章
相关标签/搜索