Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!ctrsol!uakari.primate.wisc.edu!ginosko!uunet!zeek!paul From: paul@zeek.UUCP (Paul T. Cottey) Newsgroups: comp.lang.c++ Subject: Re: C++ 2.0 question Summary: overloading Message-ID: <254@zeek.UUCP> Date: 6 Oct 89 16:08:21 GMT References: <803@odin.SGI.COM> Organization: Andersen Consulting Lines: 21 In article <803@odin.SGI.COM>, kipp@warp.sgi.com (Kipp Hickman) writes: > > So what the heck is overloading operator, (operator comma!) good for? > I can imagine several ugly things, but no nice ones... > > kipp Stroustrup, on page 122-3, suggests that a print function may be overloaded to know how to print integers, floats, characters, etc. He also states that in the cases of +, *, and <<, it would be essential to be able to call a different part of an overloaded function depending on the type(s) of the operands. For example, it is different to multiply an integer by an integer than to multiply a float by an integer. It is a good idea to use "overload" with care. Paul uunet!zeek!paul