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

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