memset()函数 【头文件】 C语言中为:#include <memory.h> 或 #include <string.h> C++中为:#include <cstring> 【使用方法】 memset函数的作用是:按照字节填充某字符 memset效率比for循环赋值和fill赋值要快一些 将int数组初始化为0: int a[10005]; memset(a, 0, sizeof(a)