Path: utzoo!attcan!uunet!samsung!usc!apple!vsi1!octopus!sjsumcs!horstman From: horstman@sjsumcs.sjsu.edu (Cay Horstmann) Newsgroups: comp.lang.c++ Subject: Re: istream::tie Keywords: istream tie Message-ID: <1989Nov26.071910.2702@sjsumcs.sjsu.edu> Date: 26 Nov 89 07:19:10 GMT References: <540@atcmpe.atcmp.nl> Reply-To: horstman@sjsumcs.SJSU.EDU (Cay Horstmann) Organization: San Jose State University Lines: 18 In article <540@atcmpe.atcmp.nl> leo@atcmp.nl (Leo Willems) writes: > >In our streams library (1.2E Glockenspiel) class istream contains the >member function: ostream* istream::tie(ostream*) > >All the manual says is that an ostream is tied to an istream and that >the use of this function is discouraged > It causes the output stream to flush when an input request comes along. That way, you can write cout << "Please enter ..."; cin >> ...; and be sure cout gets flushed before the call to cin>>, so the user sees the prompt. "The use of this function is discouraged" is Glockenspielspeak for "The writer of this documentation doesn't understand it either". :-) Cay