In message , Terje Sletteb� writes > > // These templates provide safe input for any type that supports > > operator>> > > // 1) from console with prompt > > > > template > > in_type read(std::string const & prompt, int max_tries = 3){ > > in_type temp; > >I thought your point was that you avoided the use of uninitialised >variables? However, that still happens, here. > >So maybe your point was that you have a function for providing safe >input using streams? (As we've discussed at the ACCU begin-cpp mailing >list) For some reason I elided my thoughts when I transferred them to the keyboard. I was thinking more in terms of an analogy with not having new used unwrapped in a class whose dtor calls the corresponding delete. I meant to write: Any half-way competent programmer has a mechanism to ensure that: 1) variables can support an operator >> (istream, T) can always be initialised except 2) within a function that handles failure of the call to operator>> I agree that what I wrote was far from this. I think that seeing cin >> in top level code sends a similar message to seeing delete at the same level, neither belongs at that level though both can be useful when properly encapsulated. -- ACCU Spring Conference 2003 April 2-5 The Conference you should not have missed ACCU Spring Conference 2004 Late April Francis Glassborow ACCU [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]