std::memset

From Cppreference

Jump to: navigation, search
Defined in header <cstring>

void* memset( void* dest, int ch, size_t count );

Fills a memory buffer, pointed to by dest, with a byte value ch. This function is optimized and is faster than filling the same array using for loop.

Contents

[edit] Parameters

dest - pointer to the memory location to fill
ch - fill byte
count - size of the memory location to fill

[edit] Return value

dest

[edit] Example

[edit] See also

memcpy
copies one buffer to another
(function)