home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!news.forth.gr!news.forth.gr!kilitzir
- From: kilitzir@antigone.csi.forth.gr (Xristos Kilitzirakis)
- Newsgroups: comp.lang.c++
- Subject: operator <</>> + streams
- Date: 23 Nov 1992 16:27:52 +0200
- Organization: Institute of Computer Science, FORTH Hellas
- Lines: 24
- Message-ID: <kilitzir.722527533@news.forth.gr>
- NNTP-Posting-Host: antigone.csi.forth.gr
-
- 2 simple q.s for those who have the manual near by.Mine is
- 100 km. away.
- 1)-------------------------------------------------------------
- I want to specify the operators <</>> , but I want them to work
- either with o/istream or i/ofstream + strstream.I think that
- these derived from ios , yet I'm not quite sure.
- 2)------------------------------------------------------------
- Suppose the following small program:
- class line{ Data *p;data &operator[](int);}
- class matrix(line *p;data &operator[](int){return p[i];}
- ^^^^^^^^^^
- Are these operators properly defined for the following listing ?
- data x;
- matrix f(10,10);
- x = f[1][1];
- f[1][1] = x;
- It's a trivial question , if you know the answer.
-
-
- Any answers apart from being appreciated , can be sent to
- kilitzir@csi.forth.gr
- kilitzir@ics.forth.gr
- kilitzir@csd.uch.gr
-
-