From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_00,HEADER_SPAM, PP_MIME_FAKE_ASCII_TEXT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,b30bd69fa8f63cb2 X-Google-Attributes: gid103376,public X-Google-Thread: fc772,b30bd69fa8f63cb2 X-Google-Attributes: gidfc772,public X-Google-ArrivalTime: 2003-06-14 13:25:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!nntp-relay.ihug.net!ihug.co.nz!news-out.newsfeeds.com!propagator2-maxim!news-in-maxim.spamkiller.net!usc.edu!rpi!not-for-mail From: Francis Glassborow Newsgroups: comp.lang.ada,comp.lang.c++.moderated Subject: Re: C bug of the day Date: 14 Jun 2003 16:27:12 -0400 Organization: Southfield Microcomputer SS Sender: cppmods@netlab.cs.rpi.edu Message-ID: References: <1054751321.434656@master.nyc.kbcfp.com> Reply-To: Francis Glassborow NNTP-Posting-Host: netlab.cs.rpi.edu X-Original-Date: Fri, 13 Jun 2003 18:48:58 +0100 X-Submission-Address: c++-submit@netlab.cs.rpi.edu X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated iQBVAwUAPuuFHEHMCo9UcraBAQEJNgH9FkGJP1g35dOtjr/x1+QDoWHQ4MaAVkTg moq5OiYDop44zrQ7GC45ecX2/bs+5FeBjsa7MXhlAsJaUbOGV5WXew== =iCCu Xref: archiver1.google.com comp.lang.ada:39182 comp.lang.c++.moderated:68357 Date: 2003-06-14T16:27:12-04:00 List-Id: In message , Terje Sletteb� writes >int i; > >stream >> i; > >Intialising "i" beforehand would just be vasteful. > Well yes, but any halfway competent programmer has a way to initialise a variable from a stream, in my case I use my own template that allows me to write: int i(read(stream)); and note that that allows me to initialise const qualified variables from an input stream. The special case is where we want to initialise an array from input though I do have a contortion to do that as well but only for user defined types written to provide that facility. -- ACCU Spring Conference 2003 April 2-5 The Conference you should not have missed ACCU Spring Conference 2004 Late April Francis Glassborow ACCU [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ] [ about comp.lang.c++.moderated. First time posters: do this! ]