我学C语言的时候,听说过C语言中的strset函数。
但是,我在最新版本的 C 中找不到它。
被删了吗?如果被删除了,为什么会被删除?
最佳答案
strset 仍然存在。 VS 2017 - _strset_s
#include <stdio.h>
#include <string.h>
int main() {
char text[] = "Test Code";
_strset_s(text, sizeof(text), '*');
printf("%s\n", text);
}
结果 :************
“文本代码”共 9 个字符。 所以输出九个('')
_strset_s(char *_Destination, size_t_DestinationSize, int _Value)
关于c - <string.h> 中的 strset 函数,C,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50657125/