我学的是最基础的,好像不可以用memset
以下代码#include <string.h>
#include <stdio.h>
#include <mem.h>
int main(void)
{
char buffer[] = "Hello world\n";
printf("Buffer before memset: %s\n", buffer);
memset(buffer, '*', strlen(buffer) - 1);
printf("Buffer after memset:
%s\n", buffer);
return 0;
}
出错
错误是Cannot open include file: 'mem.h': No such file or directory