错误较多,修改如下,可以续问:
//#include "stdafx.h"//If the vc++6.0, with this line.
#include
using namespace std;
char *FZ(char *a){
int i,j,t;
for(j=0,i=strlen(a)-1;j t=a[i],a[i]=a[j],a[j]=t;
return a;
}
int main(int argc,char *argv[]){
char b[80];
char *a=b;
int i;
cout << "请输入一个字符串:\n";
scanf("%80s",b);
cout << "它的反置是:" << FZ(a) << endl;
return 0;
}
#include
using namespace std;
void main()
{
char b[]={"ilove123"};
int len = sizeof(b)/sizeof(char);
char *a=NULL;
a=b;
for (int i=0; i
cout<}
cout<
for (int i=len-2; i>=0;i--)
{
cout<}
cout<
}