home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!taumet!steve
- From: steve@taumet.com (Steve Clamage)
- Subject: Re: Friend ..Overload Assignment opertr ..
- Message-ID: <1993Jan24.162220.18210@taumet.com>
- Organization: TauMetric Corporation
- References: <1993Jan22.075317.21062@usl.edu> <schmidt.32@rz.uni-passau.de>
- Date: Sun, 24 Jan 1993 16:22:20 GMT
- Lines: 19
-
- schmidt@rz.uni-passau.de (SCHMIDT GUIDO) writes:
-
- >operator=() is something like a constructor with built in destructor. You
- >can specify as many different constructors for one class as you like.
- >Likewise you can do for operator=().
-
- operator=() has nothing in common with constructors except that
- both must be member functions
- they may be overloaded
- These two things are also true for other unrelated functions.
-
- operator=() need not behave in any way like a constructor or destructor.
- If such a function exists, it is invoked when a class object is assigned
- to (but not when one is initialized). The function might or might not do
- any construction or destruction. The function is not automatically
- invoked by creating or destroying an object.
- --
-
- Steve Clamage, TauMetric Corp, steve@taumet.com
-