摘要: 按上一个appserv包 就能运行php了吗 求指教 阅读全文
posted @ 2012-12-22 11:58 _一千零一夜 阅读(83) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int main(){void swap(char *p1,char *p2);char a[80],b[80],c[80];cin>>a>>b>>c;cout0) swap(a,b);if(strcmp(a,c)>0) swap(a,c);if(strcmp(b,c)>0) swap(b,c);cout<<a<<endl;cout<<b<<endl;cout<<c<<endl;return 0;}void swap(c 阅读全文
posted @ 2012-12-22 11:49 _一千零一夜 阅读(140) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int main(){char *p="ilovechina";cout<<p<<endl;//输出"ilovechina";cout<<*p<<endl;//输出'i';return 0;} 阅读全文
posted @ 2012-12-22 11:45 _一千零一夜 阅读(88) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int main(){int length(char *p);int len;char a[80];cin>>a;cout<<a<<endl;cout<<(a+2)<<endl;//数组名和指针本质竟然差不多;(a+2)想当与另一个数组;len=length(a);cout<<len<<endl;return 0;}int length(char *p){int n;n=0;cout<<*p<<endl;//相当于输出a[0];co 阅读全文
posted @ 2012-12-22 11:42 _一千零一夜 阅读(94) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int main(){int a[8]={0,1,2,3,4,5,6,7};int *p=a;cout<<a<<endl;//输出0012FF60cout<<p<<endl;//输出0012FF60cout<<*(p+1)<<endl;//输出1;cout<<p[2]<<endl;//输出2;return 0;}数组与字符数组和指针的关系略有不同; 阅读全文
posted @ 2012-12-22 11:39 _一千零一夜 阅读(78) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;int main(){char *a="l love C++";while(*a!='\0'){cout<<*a;a++;}cout<<endl;return 0;} 阅读全文
posted @ 2012-12-22 11:36 _一千零一夜 阅读(124) 评论(0) 推荐(0) 编辑