Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to output integers as characters in c++
How to output integers as characters in c++
Itoa is a widely used non-standard C language extension function. Because it is not a standard C language function, it cannot be used in all compilers. However, most compilers, such as those on Windows, usually run on.

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

Header file:

Program example:

# include & ltstdlib.h & gt

# include & ltstdio.h & gt

int main()

{

Int number =123456;

char string[25];

Itoa (number, string,10);

Printf("integer = %d string = %s\n ",number, string);

Returns 0;

}