Sets characters in a buffer to a specified character.
#include <string.h> void *memset (void *dest, int c, size_t count); errno_t memset_s(void *dest, size_t destsize, int c, size_t count); #include <wchar.h> wchar_t *wmemset(wchar_t *dest, wchar_t c, size_t count); errno_t memset_s(void *dest, size_t destsize, wchar_t c, size_t count);
dest
destsize
c
count
The memset_s and wmemset_s functions are subject to contraints:
If there is a runtime-constraint violation, the memset_s function stores the value of c (converted to an unsigned char) into each of the first destmax characters of the object pointed to by dest if dest is not a null pointer and destmax is not greater than RSIZE_MAX.
memset returns the destination address pointer dest.
memset_s returns 0 on successful completion, else a non-zero value.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 INtime 4.2 (memset_s) INtime 6.0 (for wide-character functions) |
intime/rt/include/string.h intime/rt/include/wchar.h |
string.h wchar.h |
clib.lib |