Topic: Is there formatting methods in standard stream lib ?


Author: kanze@gabi-soft.de
Date: 1999/12/28
Raw View
Steve Clamage <stephen.clamage@sun.com> writes:

|>  Ahn Ki-yung wrote:

|>  > Not in MSVC or C++Builder

|>  > but in egcs or gcc

|>  > there is a method that wors with formatting character.

|>  >  ostream& ostream::form(const char *format, ...);
|>  >  istream& istream::scan(const char *format, ...);

|>  Since this newsgroup concerns the C++ standard, we should
|>  note that neither of these functions is part of standard C++.
|>  You cannot depend on finding them in other implementations.

Not to mention that when you use them, you give up most of the
advantages of iostream: no type safety, no extensibility.

A long time ago, g++ had a fairly complex library, with more
functionality than anyone else.  Much of this library is now caduc, and
I think that g++ has put all further development on it on hold.  Just a
suspicion, but it wouldn't surprise me if these two functions fell into
the same category.  (Anyone who actually works on g++ care to confirm or
deny?)

--
James Kanze                         mailto:James.Kanze@gabi-soft.de
Conseils en informatique orientie objet/
                  Beratung in objekt orientierter Datenverarbeitung
Ziegelh|ttenweg 17a, 60598 Frankfurt, Germany Tel. +49(069)63198627
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: Steve Clamage <stephen.clamage@sun.com>
Date: 1999/12/20
Raw View
Ahn Ki-yung wrote:
>
> Not in MSVC or C++Builder
>
> but in egcs or gcc
>
> there is a method that wors with formatting character.
>
>  ostream& ostream::form(const char *format, ...);
>  istream& istream::scan(const char *format, ...);

Since this newsgroup concerns the C++ standard, we should
note that neither of these functions is part of standard C++.
You cannot depend on finding them in other implementations.

>
> p.s. Isn't there any good reference manual for C++ ?

There are quite a few good C++ textbooks, where "good" depends
on your criteria. A suitable reference for a beginning programmer
is not a good one for an experienced programmer learning C++.
The requirements of someone implementing C++ or validating an
implementation are different still.

>      in case of C, Turbo C help or UNIX manpages
>      provides exellent reference. it even gives if the
>      function is ANSI or POSIX or OS dependent.
>      Any good reference rather than the spec itself ?
>      Do I have to bye a spec from ANSI to check it out ? Uh :-(

If you want the exact language specification, the only source is
the C++ Standard itself. Anything else is commentary. If you
want detailed explanations or a tutorial, the standard is not helpful.
It has a different purpose.

You can find an extensive collection of reviews of C++ books at
 http://www.accu.org/

--
Steve Clamage, stephen.clamage@sun.com


[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: Ahn Ki-yung <kyagrd@chiak.kaist.ac.kr>
Date: 1999/12/20
Raw View
Not in MSVC or C++Builder

but in egcs or gcc

there is a method that wors with formatting character.

 ostream& ostream::form(const char *format, ...);
 istream& istream::scan(const char *format, ...);

p.s. Isn't there any good reference manual for C++ ?
     in case of C, Turbo C help or UNIX manpages
     provides exellent reference. it even gives if the
     function is ANSI or POSIX or OS dependent.
     Any good reference rather than the spec itself ?
     Do I have to bye a spec from ANSI to check it out ? Uh :-(



[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]