// First program example #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { @autoreleasepool { NSLog (@"Programming is fun!"); } ; } 在开始解释这程序之前,我们需要先讲述下编译和运行的步骤.你可以使用xcode来编译运行,或者你也可以在终端使用oc的编译命令来编译运行.此处只介绍使用Xcode
有些时候我们需要在服务器里设置一个脚本,让他一开机就自己启动.方法如下: cd /etc/init.dvi youshell.sh #将youshell.sh修改为你自己的脚本名编写自己的脚本后保存退出.在编写脚本的时候,请先加入以下注释 #add for chkconfig#chkconfig: 2345 70 30#description: the description of the shell #关于脚本的简短描述#processname: servicename