http://blog.csdn.net/v_JULY_v/article/details/6126406
//单词翻转
///abcde edcba
///abcd dcba
void Swap(char &a,char& b)
{
char temp=a;
a=b;
b=temp;
}
void reverseAnser(char str[],int end,int begin)
{
if(end-begin<=0)
return;
Swap(str[begin],str[end]);
reverseAnser(str,--end,++begin);
}
int main()
{
char str1[]="1456";
char* str=(char*)malloc(sizeof(char)*((sizeof(str1))/sizeof(char)));
strcpy(str,str1);
reverseAnser(str,strlen(str)-1,0);
cout<<str<<endl;
return 0;
}