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

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

#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);
}

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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2021-11-10
  • 2022-01-27
猜你喜欢
  • 2021-11-13
  • 2022-12-23
  • 2022-01-22
  • 2021-07-17
  • 2021-10-11
  • 2021-09-07
  • 2022-12-23
相关资源
相似解决方案