From: Matthew Mastracci Newsgroups: comp.os.msdos.djgpp Subject: Re: Overloading the << operator. Date: Sun, 3 Aug 1997 01:19:47 -0600 Organization: The University of Calgary Lines: 17 Message-ID: <5s1bfn$5be@ds2.acs.ucalgary.ca> References: <33e40528 DOT 21082895 AT news DOT bright DOT net> NNTP-Posting-Host: mmastrac AT acs2 DOT acs DOT ucalgary DOT ca Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <33e40528.21082895@news.bright.net> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Sun, 3 Aug 1997, Scott wrote: > Is there any way to overload the << operator as a friend function in a > class in djgpp? I tried the following: > > friend ostream &operator<<(ostream &, MyClass &); > > Unfortunately, djgpp didn't like this. Anyone have any ideas? Which compiler error did you get? /\/\att /\/\astracci mmastrac AT acs DOT ucalgary DOT ca GCS/GE d- s+:+ a--- C++++ UA P+ L E-- W+ N++ o K+ w+ O M- V PS++ PE++ Y+ PGP t+++ 5+++ X++ R++ tv+ b+++ DI++++ I G++ e h r* z?