level 10
Xcode里已经装了commend Line Tools但还是不行,why?大神求救啊!
2013年12月27日 06点12分
1
level 12
我的就是在Xcode里commend Line Tools运行成功的。
ios7Xcode5加法编程方法
进入Xcode5
1 xcode->File->New->Project
2 Choose a template for your new project->OS X->Command line Tool->Next
3 Choose a template for your new project->Product Name (输入文件名)jf1->Next
4 New Folder->(建一个新目录)1->create
5 桌面->1->jf1
6 进入main.c源程序如下:
#include
int main(int argc, const char * argv[])
{
// insert code here...
printf("Hello, World!\n");
return 0;
}
7 把下面的程序复制到return 0;前。
int a,b,c;
a=2;
b=4;
c=a b;
printf("%d %d=%d\n",a,b,c);
复制到
return 0;
前
#include
int main(int argc, const char * argv[])
{
// insert code here...
printf("Hello, World!\n”);
int a,b,c;
a=2;
b=4;
c=a+b;
printf("%d %d=%d\n",a,b,c);
return 0;
}
8 product->Run
9 结果
2+4=6
2014年03月03日 01点03分
3