[LC++]Overlading << to input into my class

Julien Patrick Claassen julien at c-lab.de
Sat Dec 1 10:56:13 UTC 2001


Hello!
  Maybe it is a bad idea to use << for your class, but it's possible. But
you need to do the friend stuff. Because << is not only a member of
ostream but of ofstream, which has inherited this feature from ostream. So
you just do the friend ofstream stuff. Just replacing ostream by ofstream.
I can't give you some absolute advice, 'cause I've done that working with
<< and >> only a few times and that was quite some time ago. But the
definition you found seems familiar.
  Kindest regards
       Julien

Julien Patrick Claassen
jclaassen at gmx.de
julien at c-lab.de
http://www.geocities.com/jjs_home

SBS C-LAB
Fuerstenallee 11
33102 Paderborn

Phone: (+49) 5251 60 6060
Fax: (+49) 5251 60 6065

www.c-lab.de





More information about the tuxCPProgramming mailing list