home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13516 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.2 KB

  1. Xref: sparky comp.lang.c++:13516 gnu.g++.help:1216
  2. Path: sparky!uunet!spool.mu.edu!snorkelwacker.mit.edu!ai-lab!prep.ai.mit.edu!gnulists
  3. From: munroe@dmc.com (Dick Munroe)
  4. Newsgroups: comp.lang.c++,gnu.g++.help
  5. Subject: Re: Variable Declarations
  6. Message-ID: <gnusenet1992Sep10.083502.4515@dmc.com>
  7. Date: 10 Sep 92 12:35:02 GMT
  8. References: <u895217.716089910@bruny>
  9. Followup-To: comp.lang.c++,gnu.g++.help
  10. Organization: Doyle, Munroe Consultants, Inc., Hudson, MA
  11. Lines: 20
  12. Approved: info-gnu@prep.ai.mit.edu
  13. To: gnu-g++-announce@uunet.uu.net
  14.  
  15. In article <u895217.716089910@bruny>, u895217@bruny.cc.utas.edu.au (Scott Marshall) writes:
  16. > Hi.
  17. > I need a little advice on using C++. When given the following code, would
  18. > the variable being declared (and initialised) be re-initialised on every
  19. > iteration?
  20. >         String s = buf;
  21.  
  22. It will be reinitialized with each iteration of the loop.  This statement is
  23. equivalent to (begging the issues of constructors):
  24.  
  25.         String s ;
  26.         s = buf ;
  27. -- 
  28. Dick Munroe                Internet: munroe@dmc.com
  29. Doyle Munroe Consultants, Inc.        UUCP: ...uunet!thehulk!munroe
  30. 267 Cox St.                Office: (508) 568-1618
  31. Hudson, Ma.                FAX: (508) 562-1133
  32.  
  33. GET CONNECTED!!! Send mail to info@dmc.com to find out about DMConnection.
  34.