是否strcat()
返回错误strcat_s()
?可以strcat()
替换 strcat_s()` 吗?
char str1[50] = "To be, or not to be, ";
char str2[] = "that is the question.";
int retval = strcat_s(str1, sizeof str1, str2);
if(retval)
printf("There was an error joining the strings. Error code = %d",retval);
else
printf("The combined strings:\n%s\n", str1);