会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
夜雨阑珊
talk is cheap, give me the code!
博客园
首页
新随笔
管理
2013年6月18日
递归实现字符串翻转
摘要: #include <cstdlib>#include <iostream>using namespace std;void reverse(char *s,int len){ char ch; if(len/2>0) { ch=*s; *s=*(s+len-1); *(s+len-1)=ch; reverse(s+1,len-2); } } int main(int argc, char *argv[]...
阅读全文
posted @ 2013-06-18 17:06 夜雨阑珊
阅读(214)
评论(0)
推荐(0)
编辑