69,381
社区成员
发帖
与我相关
我的任务
分享
int len1 = strlen(password);
char buf1[len1-1];
if(password)
{
//int len1 = strlen(password); // 将buf1的定义放到if之前
//char buf1[len1-1];
strcpy(buf1,password);
pw = rtspace(buf1);
printf("render: the password is : %s\n",pw);
}
if(password)
{
int len1 = strlen(password);
char buf1[len1-1];
strcpy(buf1,password);
//pw = rtspace(buf1);
pw = (char*) malloc((strlen(buf1) + 1) * sizeof(char));
memset(pw, 0, strlen(buf1) + 1);
strcpy(pw, rtspace(buf1);
printf("render: the password is : %s\n",pw);
}