| delorie.com/archives/browse.cgi | search |
| From: | Matthew Mastracci <mmastrac AT acs DOT ucalgary DOT ca> |
| 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 |
| In-Reply-To: | <33e40528.21082895@news.bright.net> |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
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?
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |