| delorie.com/archives/browse.cgi | search |
| Date: | Tue, 30 Apr 1996 14:56:07 +1000 |
| From: | root <root AT linuxbox DOT nse DOT com DOT au> |
| Message-Id: | <199604300456.OAA07634@linuxbox.nse.com.au> |
| To: | Rikard Thunberg <thunberg AT algonet DOT se> |
| CC: | djgpp AT delorie DOT com |
| Subject: | atoi <> itoa (?) |
| In-Reply-To: | <86546674@toto.iv> |
| Reply-To: | naderr AT topaz DOT cqu DOT edu DOT au |
Rikard Thunberg writes:
> I need the reverse function of atoi(), say itoa() for UNIX and MSDOS (djgpp). Unfortunately, I can't find such
> function (ANSI C).
> Please help.
>
char *itostr(long i, char *str)
{
sprintf(str, "%ld", i);
return (str);
}
Cheers,
Rob
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |