Re: how to convert integer to string
From: John Gordon (gordon_at_panix.com)
Date: 09/26/05
- Next message: Ed Morton: "Re: how to convert integer to string"
- Previous message: Bit Twister: "Re: how to convert integer to string"
- In reply to: hirenshah.05_at_gmail.com: "how to convert integer to string"
- Next in thread: jpd: "Re: how to convert integer to string"
- Reply: jpd: "Re: how to convert integer to string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Sep 2005 19:59:24 +0000 (UTC)
In <1127764115.096827.16830@o13g2000cwo.googlegroups.com> "hirenshah.05@gmail.com" <hirenshah.05@gmail.com> writes:
> i tries itoa, but it is not compiling. so please tell me how to convert
> integer to string
itoa() isn't a standard function. Some computers have it, and some don't.
Try sprintf():
char buffer[99];
int i = 357;
sprintf(buffer, "%d", i);
/* buffer now contains "357" */
-- John Gordon "It's certainly uncontaminated by cheese." gordon@panix.com
- Next message: Ed Morton: "Re: how to convert integer to string"
- Previous message: Bit Twister: "Re: how to convert integer to string"
- In reply to: hirenshah.05_at_gmail.com: "how to convert integer to string"
- Next in thread: jpd: "Re: how to convert integer to string"
- Reply: jpd: "Re: how to convert integer to string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|