howdy i have a simple question here, that is how to convert an integer to a string ? i tried this but failed:
any help ???Code:string s; char c; x = (char) 5; s = "you got a " + x + " here~";
howdy i have a simple question here, that is how to convert an integer to a string ? i tried this but failed:
any help ???Code:string s; char c; x = (char) 5; s = "you got a " + x + " here~";
Never end on learning~
Code:Syntax #include <stdlib.h> char *itoa ( int value, char *buffer, int radix); Parameters value (IN) Specifies the integer value to be converted. buffer (OUT) Points to the character array. radix (IN) Specifies the base to be used in converting the integer. It must be in the range of 2 - 36. Return Values Returns the pointer to the result.
Yeah, read the FAQ. There are examples in there.Originally posted by black
howdy i have a simple question here, that is how to convert an integer to a string ? i tried this but failed:
any help ???
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
thanx guys that FAQ really helps
Never end on learning~