delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/05/10/14:15:09

From: Nate Eldredge <neldredge AT hmc DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Why does DJGPP support itoa() but Linux does not?
Date: 10 May 2001 11:02:08 -0700
Organization: InterWorld Communications
Lines: 21
Sender: nate AT mercury DOT st DOT hmc DOT edu
Message-ID: <83lmo513rz.fsf@mercury.st.hmc.edu>
References: <9deict$4jk$2 AT ctb-nnrp2 DOT saix DOT net>
NNTP-Posting-Host: mercury.st.hmc.edu
Mime-Version: 1.0
X-Trace: nntp1.interworld.net 989517728 69321 134.173.57.219 (10 May 2001 18:02:08 GMT)
X-Complaints-To: usenet AT news DOT interworld DOT net
NNTP-Posting-Date: Thu, 10 May 2001 18:02:08 +0000 (UTC)
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Stefan Viljoen" <Stefan_Viljoen AT excite DOT com> writes:

> Hi!
> 
> I am using Redhat 6.0 - there seems to be not itoa() in Linux? I am saying
> this as DJGPP (also based on GCC) supports the itoa() func in stdlib?
> 
> How do I convert an integer to a string in a Linux C program?
> 
> I realise this is not DJGPP related but I have used itoa() successfully in
> DJGPP programs, but using it in a Linux program just brings up the "implicit
> declaration of function" error even when including stdlib.h i. e. it does
> not exist in the linux stdlib?

No, it doesn't.  But you can probably use sprintf instead, which is
ANSI standard and should exist everywhere.

-- 

Nate Eldredge
neldredge AT hmc DOT edu

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019