int link_admin_pwd(char * admin_pwd, char *admin, char*pwd) { if (admin == (char *)NULL || pwd == (char *) NULL) { return -1; } if (strlen(admin) == 0 || strlen(pwd) == 0) { return -2; } fprintf(admin_pwd, "%s:%s", admin,pwd); return 0; }
CPP:
error C2664: ‘fprintf‘ : cannot convert parameter 1 from ‘char *‘ to ‘FILE *‘
C:
warning C4133: ‘function‘ : incompatible types - from ‘char *‘ to ‘FILE *‘
一出笔误, 用C编译,仅仅报警告,运行起来直接崩溃,
用CPP编译报ERROR,无法继续运行
用C编译不可忽略警告信息啊
总结一处笔误
时间: 2024-10-17 15:43:18