std::wmemset
De cppreference.com
|
|
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
| Definido en el archivo de encabezado <cwchar>
|
||
wchar_t* wmemset( wchar_t* dest, wchar_t ch, std::size_t count ); |
||
Copias
ch carácter ancho en cada uno de los primeros count caracteres anchos del objeto apuntado por dest. Si el objeto no es trivial-copiable (por ejemplo, escalar, matriz o una estructura C-compatible), el comportamiento no está definido. Si los puntos dest+size+1 fuera del objeto, el comportamiento no está definido .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.
You can help to correct and verify the translation. Click here for instructions.
Parámetros
| dest | - | puntero al objeto de llenar
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 | - | llenar 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 | - | número de bytes que llenar
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. |
Valor de retorno
dest
Ejemplo
Ejecuta este código
#include <iostream>
#include <cwchar>
int main()
{
int a[20];
std::memset(a, 0, sizeof(a));
std::cout << "a[0] = " << a[0] << '\n';
}
Salida:
a[0] = 0
Ver también
| Copia una cierta cantidad de caracteres anchos entre dos arrays que no se superponen (función) | |
| Asigna por copia el valor dado a todos los elementos de un rango. (plantilla de función) | |
(C++11) |
Comprueba si un tipo es trivialmente copiable. (plantilla de clase) |
Documentación de C para wmemset
| |