strrev——串的倒转
函数名: strrev
功 能: 串倒转
用 法: char *strrev(char *str);
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
///forward最好是数组,否则出错。
char forward[7] = "string";
cout<<"Before strrev():"<<forward<<endl;
strrev(forward);
cout<<"After strrev():"<<forward<<endl;
return 0;
}
posted on 2011-11-22 21:39 More study needed. 阅读(222) 评论(0) 编辑 收藏 举报