Namespace
Varianti

std::memset

Da cppreference.com.
< cpp‎ | string‎ | byte

 
 
Stringhe libreria
Null-stringhe terminate
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Byte stringhe
Multibyte stringhe
Stringhe larghe
Classi
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string
char_traits
 
Null-stringhe terminate byte
Funzioni
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Carattere manipolazione
Original:
Character manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Le conversioni in formati numerici
Original:
Conversions to numeric formats
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Della gestione delle stringhe
Original:
String manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
strcpy
strncpy
strcat
strncat
strxfrm
String esame
Original:
String examination
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Memoria manipolazione
Original:
Memory manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
memchr
memcmp
memset
memcpy
memmove
Varie
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
strerror
 
Defined in header <cstring>
void* memset( void* dest, int ch, std::size_t count );
Converte il valore di ch unsigned char e lo copia in ciascuno dei personaggi count primi l'oggetto puntato da dest. Se l'oggetto non è banalmente-copiabile (ad esempio, scalare, un array o un C-compatibile struct), il comportamento è indefinito. Se count è maggiore della dimensione dell'oggetto puntato da dest, il comportamento è indefinito.
Original:
Converts the value ch to unsigned char and copies it into each of the first count characters of the object pointed to by dest. If the object is not trivially-copyable (e.g., scalar, array, or a C-compatible struct), the behavior is undefined. If count is greater than the size of the object pointed to by dest, the behavior is undefined.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Indice

[modifica] Parametri

dest -
puntatore all'oggetto da riempire
Original:
pointer to the object to fill
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ch -
riempire byte
Original:
fill byte
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
count -
numero di byte da riempire
Original:
number of bytes to fill
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Valore di ritorno

dest

[modifica] Esempio

#include <iostream>
#include <cstring>
 
int main()
{
    int a[20];
    std::memset(a, 0, sizeof(a));
    std::cout << "a[0] = " << a[0] << '\n';
}

Output:

a[0] = 0

[modifica] Vedi anche

copia un buffer all'altro
Original:
copies one buffer to another
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funzione) [edit]
assegna un valore a un numero di elementi
Original:
assigns a value to a number of elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funzione di modello) [edit]
checks if a type is trivially copyable
(classe template) [edit]
C documentation for memset