2012年2月17日

Cocos2d学习 入门

摘要: 1,准备工作下载模版地址http://www.cocos2d-iphone.org/download最好下载稳定版解压后,打开终端安装用root权限打开install-templates.sh2,利用模版创建一个projectmain文件主要创建了一个自动释放池 然后链接一个托管类托管类可以创建一个主窗口,一个根控制器添加开始,暂停,结束等要调用的函数开始先设置[director setDeviceOrientation:kCCDeviceOrientationLandscapeLeft];//初始化方向[directorsetAnimationInterval:1.0/60];//动画刷新速 阅读全文

posted @ 2012-02-17 23:26 bingwenst 阅读(161) 评论(0) 推荐(0)

PAT 1015

摘要: 1 #include <cstdio> 2 #include <iostream> 3 #include <iomanip> 4 #include <vector> 5 #include <string> 6 7 using namespace std; 8 9 bool testP(int N)10 {11 if(N == 1)12 return false;13 for(int i=1;i<=N;i++)14 {15 if((N%i == 0) &&( i !=1) && (i != N))1 阅读全文

posted @ 2012-02-17 23:23 bingwenst 阅读(210) 评论(0) 推荐(0)

PAT 1010

摘要: 1 #include <cstdio> 2 #include <iostream> 3 #include <iomanip> 4 #include <vector> 5 #include <string> 6 7 using namespace std; 8 9 char A[11]; 10 char B[11]; 11 long long least; 12 13 long long num2Dec(char * p,long long radix) 14 { 15 long long len=strlen(p); 16... 阅读全文

posted @ 2012-02-17 23:23 bingwenst 阅读(923) 评论(1) 推荐(0)

PAT 1007

摘要: 1 #include <cstdio> 2 #include <iostream> 3 #include <iomanip> 4 #include <vector> 5 #include <string> 6 7 using namespace std; 8 9 10 int main()11 {12 int n = 0;13 cin>>n;14 int temp;15 int sum = 0,tempsum;16 int start,end,tempstart;17 int first,last;18 for(int i 阅读全文

posted @ 2012-02-17 23:21 bingwenst 阅读(157) 评论(0) 推荐(0)

PAT 1005

摘要: 1 #include <cstdio> 2 #include <iostream> 3 #include <iomanip> 4 #include <vector> 5 6 using namespace std; 7 void my_print(int m); 8 int main() 9 {10 int sum = 0;11 char temp;12 int k ;13 while(1)14 {15 temp = cin.get();16 k = temp - '0';17 if(k<0 || k>... 阅读全文

posted @ 2012-02-17 23:19 bingwenst 阅读(180) 评论(0) 推荐(0)

PAT 1003

摘要: 1 #include <cstdio> 2 #include <iostream> 3 #include <iomanip> 4 #include <vector> 5 6 using namespace std; 7 struct Road 8 { 9 int start; 10 int end; 11 int length; 12 }; 13 int n,m,c1,c2; 14 int short_road_length=1,short_road_num=1,max_num=0; 15 int temp = 0,road... 阅读全文

posted @ 2012-02-17 23:18 bingwenst 阅读(756) 评论(0) 推荐(0)

PAT 1002

摘要: 1 #include <cstdio> 2 #include <iostream> 3 #include <iomanip> 4 #include <vector> 5 6 using namespace std; 7 int main() 8 { 9 int n1;10 vector<double> num1;11 vector<int> num1index;12 int n2;13 vector<double> num2;14 vector<int> num2index;15 16 vector 阅读全文

posted @ 2012-02-17 23:15 bingwenst 阅读(189) 评论(0) 推荐(0)

PAT 1001

摘要: 1 #include <cstdio> 2 #include <iostream> 3 #include <iomanip> 4 #include <vector> 5 6 using namespace std; 7 void myprint(int m); 8 int main() 9 {10 int a,b,sum;11 cin>>a>>b;12 sum = a+b;13 if(sum < 0)14 {15 cout<<"-";16 sum = -sum;17 }18 mypri 阅读全文

posted @ 2012-02-17 23:10 bingwenst 阅读(189) 评论(0) 推荐(0)

导航