2016年9月9日

函数指针和指针函数

摘要: #include <iostream> using namespace std; int (*ptr)(int a,int b);int fun(int x,int y){ int z; z=x>y?x:y; return z; } int fun3(int a){//传的是副本 cout<<"** 阅读全文

posted @ 2016-09-09 20:07 邗影 阅读(253) 评论(0) 推荐(0)

指针c艹

摘要: #include <iostream> using namespace std;int value=1;void func(int *p){ p=&value; }void func(int **p)。。。。。。。重载{ *p=&value; }int main(){ int a=3; int *p 阅读全文

posted @ 2016-09-09 19:11 邗影 阅读(182) 评论(0) 推荐(0)

汉诺塔,水仙花

摘要: #include <iostream> using namespace std; void hanno(char a,char b,char c,int s){ if(s==1) { cout<<a<<" "<<c<<endl; return; } else{ hanno(a,c,b,s-1); c 阅读全文

posted @ 2016-09-09 14:04 邗影 阅读(176) 评论(0) 推荐(0)

导航