Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problem with itoa function

0 views
Skip to first unread message

Michel Meunier

unread,
Oct 6, 2002, 3:50:36 PM10/6/02
to
Hello,
I am trying to use itoa function (of course with stdlib.h included), but g++
tell me that itoa is an unknown function??

I can't understand where is the problem. I work under RH7.3 and g++
compiler.

Thank you


Lars Luthman

unread,
Oct 6, 2002, 4:02:00 PM10/6/02
to
Michel Meunier <michel.m...@wanadoo.fr> wrote:
> Hello,
> I am trying to use itoa function (of course with stdlib.h included), but g++
> tell me that itoa is an unknown function??

That's because it doesn't exist in GNU's standard C library. itoa isn't
defined in the ANSI C standard. You could use sprintf instead.


--ll

Ulf-Rainer Tietz

unread,
Oct 6, 2002, 4:12:42 PM10/6/02
to
Michel Meunier wrote:

Hello,
where in stdlib.h is itoa ?
use sprintf or similar

Kasper Dupont

unread,
Oct 7, 2002, 1:52:25 AM10/7/02
to

I have now added this to the FAQ:
http://www.daimi.au.dk/~kasperd/comp.os.linux.development.faq.html#itoa

--
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:aaa...@daimi.au.dk

Kaz Kylheku

unread,
Oct 7, 2002, 1:17:26 PM10/7/02
to
"Michel Meunier" <michel.m...@wanadoo.fr> wrote in message news:<anq458$lvq$1...@wanadoo.fr>...

I tried to order ``chowder'' in a restaurant while vacationing in
Italy. All I got was dumb looks from the waiter. I can't understand
where the problem is! Why can't the world just adjust itself to my
expectations?

Lew Pitcher

unread,
Oct 8, 2002, 10:35:52 PM10/8/02
to

To the OP:

Of course, there is good news. Unlike the restaurants in Italy, where
you would be ejected forcably if you intruded into the kitchen to cook
up your own "chowder", here in the Linux community, you _can_ write your
own implementation of itoa().

The recipe is easy (it's one that any competent cook should be able to
make up from scratch), the cooking utensils are readily available, and
both the other patrons and the cooking staff have no problem if you do.


--
Lew Pitcher

Master Codewright and JOAT-in-training
Registered (Slackware) Linux User #112576 (http://counter.li.org/)

0 new messages