Exportar (0) Imprimir
Expandir todo
div
eof
Expandir Minimizar
Este tema aún no ha recibido ninguna valoración - Valorar este tema

_ultoa, _ultow

Convert an unsigned long integer to a string. These functions are deprecated because more secure versions are available; see _ultoa_s, _ultow_s.


char *_ultoa(
   unsigned long value,
   char *str,
   int radix 
);
wchar_t *_ultow(
   unsigned long value,
   wchar_t *str,
   int radix 
);
template <size_t size>
char *_ultoa(
   unsigned long value,
   char (&str)[size],
   int radix 
); // C++ only
template <size_t size>
wchar_t *_ultow(
   unsigned long value,
   wchar_t (&str)[size],
   int radix 
); // C++ only

Parameters

value

Number to be converted.

str

String result.

radix

Base of value.

Each of these functions returns a pointer to str. There is no error return.

The _ultoa function converts value to a null-terminated character string and stores the result (up to 33 bytes) in str. No overflow checking is performed. radix specifies the base of value; radix must be in the range 2 – 36. _ultow is a wide-character version of _ultoa.

Security noteSecurity Note

To prevent buffer overruns, ensure that the str buffer is large enough to hold the converted digits plus the trailing null-character.

In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see Secure Template Overloads.

Generic-Text Routine Mappings
TCHAR.H routine _UNICODE & _MBCS not defined _MBCS defined _UNICODE defined

_ultot

_ultoa

_ultoa

_ultow

Routine Required header Compatibility

_ultoa

<stdlib.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

_ultow

<stdlib.h> or <wchar.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

For additional compatibility information, see Compatibility in the Introduction.

See the example for _itoa.

¿Te ha resultado útil?
(Caracteres restantes: 1500)
Gracias por sus comentarios

Adiciones de comunidad

AGREGAR
Mostrar:
© 2014 Microsoft. Reservados todos los derechos.