|
From: mpstarix <mps...@ya...> - 2000-12-06 18:23:06
|
Try
{
char thestring[whatever]
sprintf(whatever,"John has %d apples,muInt);
}
sprintf applies a format and then puts the result into a string
At 17:58 06/12/2000 +0100, you wrote:
>Read my question and you know that I'am a Neewbe :-)
>
>How to convert, cast, transform, whatever a int value to a string?
>
>include <string.h>
>
>string my1String = "John has";
>string my2String = "apples!";
>int myInt = 6;
>
>my1stString = my1stString + UNKNOWN_FUNC(myInt) + my2ndString;
>
>As you guessed I'd like to get:
>"John has 6 apples!"
>
>Gregor
>
>
>
>
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users
|