🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2851

Re: AT&T enhancements for the DAP CD-ROM disk for $10. Worth it?

#2851
From: checker
Date: Tue, 15 Dec 1992 05:58
20 lines
1143 bytes
lansche@torolab6.VNET.IBM.COM (Martin Lansche) writes about iostreams: 

>  If you are doing stdio-type of programming, then (1) [streams] is
> also useful. If you are doing PM programming, it is not.

Actually, strstreams are very useful even if you never use stdio. 
Temporary formatting buffers are a breeze:

char aBuffer[100];
ostrstream Out(aBuffer,100);

Out<<"This is a double: "<<1.34<<endl<<"An int: "<<234<<ends;

They are ever so much easier to use than sprintf and safer; it's
typesafe and it won't overflow the array.  If you don't construct it
with a buffer it dynamically allocates one for you and grows it as
necessary.  Don't forget the ends at the end or you won't have a null
terminated buffer.

Chris
Technical Details
Message-ID: <2106@acf5.NYU.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!rpi!news.ans.net!cmcl2!acf5!checker
References: <Bz7L6w.3r8@cs.uiuc.edu> <19921214.065050.16@almaden.ibm.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!rpi!news.ans.net!cmcl2!acf5!checker
From: checker@acf5.NYU.EDU (checker)
Newsgroups: comp.os.os2.programmer
Subject: Re: AT&T enhancements for the DAP CD-ROM disk for $10. Worth it?
Message-ID: <2106@acf5.NYU.EDU>
Date: 15 Dec 92 05:58:06 GMT
References: <Bz7L6w.3r8@cs.uiuc.edu> <19921214.065050.16@almaden.ibm.com>
Organization: New York University
Lines: 21