◐ Shell
clean mode source ↗

std::wmemset — cppreference.com

De cppreference.com

<metanoindex/>

<tbody> </tbody>

Déclaré dans l'en-tête

<cwchar>

wchar_t* wmemset( wchar_t* dest, wchar_t ch, std::size_t count );

Des copies ch caractère large dans chacun des premier count caractères larges de l'objet pointé par dest. Si l'objet n'est pas trivialement-copiable (par exemple, un scalaire, un tableau ou une structure C-compatible), le comportement est indéfini. Si les points dest+size+1 dehors de l'objet, le comportement est indéfini .

Original:

Copies wide character ch into each of the first count wide 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 dest+size+1 points outside the object, 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.

Paramètres

dest -

pointeur vers l'objet à remplir

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 -

remplir octet

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 -

nombre d'octets à remplir

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.

Retourne la valeur

dest

Exemple

#include <iostream>
#include <cwchar>

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

Résultat :

Voir aussi

copie d'un certain nombre de caractères larges entre deux rangées ne se chevauchent pas

Original:

copies a certain amount of wide characters between two non-overlapping arrays

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(fonction) [edit]

assigne une valeur à un nombre d'éléments

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.


(fonction générique) [edit]
checks if a type is trivially copyable
(classe générique) [edit]

C documentation for wmemset