char *s=&src[len-1];为什么编译会出语法错误
#include "stdio.h"#include "string.h"
main(void)
{
char *src="hello,world";
char *dest=NULL;
char *d;
int len=strlen(src);
dest=(char*)malloc(len+1);
d=dest;
char *s=&src[len-1];/* ???为什么会有语法错误*/
while(len--!=0)
*d++=*s--;
*d = 0;//β²¿Òª¼Ó\0
printf("%s\n",dest);
free(dest);// ʹÓÃÍ꣬Ӧµ±Êͷſռ䣬ÒÔÃâÔì³ÉÄÚ´æ»ãй¶
return 0;
}