Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!ncar!dinl!noren From: noren@dinl.uucp (Charles Noren) Newsgroups: comp.lang.c++ Subject: Re: Why use reference type over pointer type? Message-ID: <1687@dinl.mmc.UUCP> Date: 8 Aug 90 18:32:48 GMT References: <1676@dinl.mmc.UUCP> <5720@darkstar.ucsc.edu> <21810@lute.com> Reply-To: noren@dinl.UUCP (Charles Noren) Organization: Martin Marietta I&CS, Denver CO. Lines: 20 Thanks to all those who replied. Its been two weeks since I started really reading C++ books and writing C++ code. My question looks REALLY naive now. While reference types are a convenience, they are som amazingly convenient in *so* many circumstances that I view it as a necessity. For instance, when for an exercise I created array and matrix classes, the overloading of the operator [] requires its use (along with a host of other operators, such as +=) to permit the natural use of the operators. So to answer my question, reference types are extemely useful in many areas of C++ programming and the question just pointed to my lack of experience in the language. Thanks for all the kind people who took pity on my lowly understanding of C++ and gently enlightened me in reference to reference types. -- Chuck Noren NET: dinl!noren@ncar.ucar.edu US-MAIL: Martin Marietta I&CS, MS XL8058, P.O. Box 1260, Denver, CO 80201-1260 Phone: (303) 971-7930