memset函数作用

pyzs2004 2005-12-02 07:51:34
STRU_A ls_a; //STRU_A是一个自定义结构体

memset( &ls_a,0x00,sizeof( STRU_A ))

请问memset这个函数是什么意思,有什么作用?
...全文
170 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
pyzs2004 2005-12-02
  • 打赏
  • 举报
回复
这么快就有人答复了,真的是谢谢楼上的几位了.
明白了.
sankt 2005-12-02
  • 打赏
  • 举报
回复
楼上的都对
guyanhun 2005-12-02
  • 打赏
  • 举报
回复
功 能: 设置s中的所有字节为ch, s数组的大小由n给定
用 法: void *memset(void *s, char ch, unsigned n);
aimwon 2005-12-02
  • 打赏
  • 举报
回复
void *memset(
void *dest,
int c,
size_t count
);
wchar_t *wmemset(
wchar_t *dest,
wchar_t c,
size_t count
);



Sets the first count chars of dest to the character c.

Security Note Make sure that the destination buffer is the same size or larger than the source buffer

70,022

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧