Topic: What use is cin and cout ?


Author: alan.illeman@canrem.com (Alan Illeman)
Date: Sun, 10 Apr 94 21:00:00 -0400
Raw View
Borland's (C++ version 3.1) iostream.h refers to the AT&T release of
streams. Will AT&T, if I ask them, supply me with a copy of this
definitive document ?

Most of my programs are event driven, i.e. I intercept the keyboard
( and mouse ) and stuff an event queue much in the same way as Borland's
turbovision does. I would seem that I have little use for cin. Output
from the event queue never goes to stdout so it would seem that I have
little use for cout, either.

As a novice C++ programmer (but not a novice programmer), I would like
to use streams, if only to get a handle on them. Any advice anyone ?
( I'm not the slightest bit interested in portability )

In Borland's source code, file IOSTSTD.CPP, cin is defined initially:

     istream_withassign cin;

The Programmer's Guide (p 204) says that istream_withassign has no
member functions, although the = operator is overloaded. Can someone
give me an example of a ( useful ) class derived from
istream_withassign, that is somehow different from one derived from
istream ? Maybe an example of a ( *useful* ) class derived from
istream would be a good starting point.

Alan

CRS Online, Toronto, Ontario, Canada. (416) 213-6002/3
RelayNet: ->118, Internet: alan.illeman@canrem.com

At school I was in a class of my own - all the other kids got promoted.