Re: _itoa( )
From: Robert Stankowic (pcdoktor_at_netway.at)
Date: 10/09/03
- Next message: John Smith: "Re: Learning C++?"
- Previous message: Robert Fortune: "Re: Random numbers."
- In reply to: Josh Sebastian: "Re: _itoa( )"
- Next in thread: Josh Sebastian: "Re: _itoa( )"
- Reply: Josh Sebastian: "Re: _itoa( )"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 9 Oct 2003 09:30:23 +0200
"Josh Sebastian" <curien@cox.net> schrieb im Newsbeitrag
news:pan.2003.10.09.00.33.06.925343@cox.net...
> On Wed, 08 Oct 2003 19:13:57 -0500, brigham white wrote:
>
> > Oh, sorry I'm a bit naive about the issue, I thought since you needed
> > stdlib.h to use it that it was standard.. can you tell me where to go?
>
> Try a group that discusses your compiler. I'm guessing it's MS VC++, in
> which case you want microsoft.public.vc.language. MS prefixes their
> non-standard functions with an underscore, so if it starts with an
> underscore, even if it's in a standard header, it's probably a
> compiler-specific extension.
OP:
Does char *_itoa( int value, char *string, int radix ) allocate the buffer
for string? or does the caller need to?
^^^^^^
Beat me if I'm wrong, but IMHO the question can be answered from the
prototype, and the answer is topical here:
char *_itoa( int value, char *string, int radix );
^^^^^^^^^^^^
a pointer to char is passed by value, therefore the caller _must_ allocate
the buffer, there is no way for the callee to allocate the string.
kind regards
Robert
- Next message: John Smith: "Re: Learning C++?"
- Previous message: Robert Fortune: "Re: Random numbers."
- In reply to: Josh Sebastian: "Re: _itoa( )"
- Next in thread: Josh Sebastian: "Re: _itoa( )"
- Reply: Josh Sebastian: "Re: _itoa( )"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|