Click here to Skip to main content
16,005,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAnyone has any experience on using CHtmlEditCtrl? Pin
usfesco2-Apr-04 13:06
usfesco2-Apr-04 13:06 
QuestionRe: Anyone has any experience on using CHtmlEditCtrl? Pin
Debapritam Chakra29-Dec-16 4:05
Debapritam Chakra29-Dec-16 4:05 
GeneralCOnverting char to int and retaining value Pin
CNewbie2-Apr-04 12:50
CNewbie2-Apr-04 12:50 
GeneralRe: COnverting char to int and retaining value Pin
Michael Dunn2-Apr-04 13:58
sitebuilderMichael Dunn2-Apr-04 13:58 
GeneralRe: COnverting char to int and retaining value Pin
CNewbie2-Apr-04 18:56
CNewbie2-Apr-04 18:56 
GeneralRe: COnverting char to int and retaining value Pin
Johnny ²2-Apr-04 23:42
Johnny ²2-Apr-04 23:42 
GeneralRe: COnverting char to int and retaining value Pin
Pedro Ruiz2-Apr-04 23:50
Pedro Ruiz2-Apr-04 23:50 
GeneralRe: COnverting char to int and retaining value Pin
GflPower4-Apr-04 19:12
GflPower4-Apr-04 19:12 
itoa, _i64toa, _ui64toa, _itow, _i64tow, _ui64tow
Convert an integer to a string.

char *_itoa( int value, char *string, int radix );

char *_i64toa( __int64 value, char *string, int radix );

char * _ui64toa( unsigned _int64 value, char *string, int radix );

wchar_t * _itow( int value, wchar_t *string, int radix );

wchar_t * _i64tow( __int64 value, wchar_t *string, int radix );

wchar_t * _ui64tow( unsigned __int64 value, wchar_t *string, int radix );

Routine Required Header Compatibility
_itoa <stdlib.h> Win 95, Win NT
_i64toa <stdlib.h> Win 95, Win NT
_ui64toa <stdlib.h> Win 95, Win NT
_itow <stdlib.h> Win 95, Win NT
_i64tow <stdlib.h> Win 95, Win NT
_ui64tow <stdlib.h> Win 95, Win NT


For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version


Return Value

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

Parameters

value

Number to be converted

string

String result

radix

Base of value; must be in the range 2 – 36

Remarks

The _itoa, _i64toa, and _ui64toa function convert the digits of the given value argument to a null-terminated character string and stores the result (up to 33 bytes) in string. If radix equals 10 and value is negative, the first character of the stored string is the minus sign ( – ). _itow, _i64tow, and _ui64tow are wide-character versions of _itoa, _i64toa, and _ui64toa respectively.

Generic-Text Routine Mappings

TCHAR.H Routine _UNICODE & _MBCS Not Defined _MBCS Defined _UNICODE Defined
_itot _itoa _itoa _itow


Example

/* ITOA.C: This program converts integers of various
* sizes to strings in various radixes.
*/

#include <stdlib.h>
#include <stdio.h>

void main( void )
{
char buffer[20];
int i = 3445;
long l = -344115L;
unsigned long ul = 1234567890UL;

_itoa( i, buffer, 10 );
printf( "String of integer %d (radix 10): %s\n", i, buffer );
_itoa( i, buffer, 16 );
printf( "String of integer %d (radix 16): 0x%s\n", i, buffer );
_itoa( i, buffer, 2 );
printf( "String of integer %d (radix 2): %s\n", i, buffer );

_ltoa( l, buffer, 16 );
printf( "String of long int %ld (radix 16): 0x%s\n", l,
buffer );

_ultoa( ul, buffer, 16 );
printf( "String of unsigned long %lu (radix 16): 0x%s\n", ul,
buffer );
}


Output

String of integer 3445 (radix 10): 3445
String of integer 3445 (radix 16): 0xd75
String of integer 3445 (radix 2): 110101110101
String of long int -344115 (radix 16): 0xfffabfcd
String of unsigned long 1234567890 (radix 16): 0x499602d2


Data Conversion Routines

See Also _ltoa, _ultoa


d
GeneralCString::Format() Pin
Oriented2-Apr-04 12:33
Oriented2-Apr-04 12:33 
GeneralRe: CString::Format() Pin
Michael Dunn2-Apr-04 13:57
sitebuilderMichael Dunn2-Apr-04 13:57 
GeneralRe: CString::Format() Pin
gUrM33T2-Apr-04 15:25
gUrM33T2-Apr-04 15:25 
GeneralRe: CString::Format() Pin
Prakash Nadar2-Apr-04 16:19
Prakash Nadar2-Apr-04 16:19 
GeneralRe: CString::Format() Pin
Graham Bradshaw2-Apr-04 21:53
Graham Bradshaw2-Apr-04 21:53 
GeneralRe: CString::Format() Pin
Prakash Nadar3-Apr-04 2:27
Prakash Nadar3-Apr-04 2:27 
GeneralRe: CString::Format() Pin
Gary R. Wheeler3-Apr-04 2:55
Gary R. Wheeler3-Apr-04 2:55 
GeneralScroll Bar Pin
Oriented2-Apr-04 12:16
Oriented2-Apr-04 12:16 
GeneralRe: Scroll Bar Pin
gUrM33T2-Apr-04 15:33
gUrM33T2-Apr-04 15:33 
GeneralParse CHAR pointers Pin
gls2ro2-Apr-04 11:55
gls2ro2-Apr-04 11:55 
GeneralRe: Parse CHAR pointers Pin
John R. Shaw2-Apr-04 12:11
John R. Shaw2-Apr-04 12:11 
GeneralRe: Parse CHAR pointers Pin
gUrM33T2-Apr-04 15:28
gUrM33T2-Apr-04 15:28 
GeneralRead Write ANSI/C Pin
gls2ro2-Apr-04 10:44
gls2ro2-Apr-04 10:44 
GeneralRe: Read Write ANSI/C Pin
Anonymous2-Apr-04 11:08
Anonymous2-Apr-04 11:08 
Generalchar ** problem (ANSI C) Pin
kfaday2-Apr-04 6:44
kfaday2-Apr-04 6:44 
GeneralRe: char ** problem (ANSI C) Pin
David Crow2-Apr-04 6:53
David Crow2-Apr-04 6:53 
GeneralRe: char ** problem (ANSI C) Pin
kfaday2-Apr-04 7:15
kfaday2-Apr-04 7:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.