C ++

Source: Internet
Author: User

Int I = atoi (m_strsendperiod); // convert it to an integer.
Settimer (1, m_strsendperiod, null );

 

 

 

//////////////////////////////////////// //////////////////////////////

 

 

 

 

_ 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 _ 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): 0 xfffabfcd
String of unsigned long 1234567890 (Radix 16): 0x499602d2

Data conversion routines

See also _ ltoa, _ ultoa

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.