www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/16/11:42:36

Date: Wed, 16 Feb 2000 07:28:18 -0800
Message-Id: <200002161528.HAA13277@www1.xoommail.com>
X-Loop: xoommail.com
From: Brian Ronk <rithe AT xoommail DOT com>
Subject: ofstream and ifstream problems
To: djgpp AT delorie DOT com
Reply-To: djgpp AT delorie DOT com

In a class that I created, I added a friend 
ifstream and ofstream so I can put the class into 
a file and get it from a file easily.  I put the 
declaration of the operators (>> for ifstream, and 
<< for ofstream) before I started my private 
section.  I am getting the error that my function 
can only have one parameter.  One of my 
declarations is as follows:

friend ofstream& operator<<(ofstream& ofstr, Map& 
map);

The ifstream one is pretty much the same.  Now, I 
have another class that has the same functionality 
with the ofstream and ifstream, but I don't get 
any complaints about that one when I compile it.  
Are there any ideas about what is going on?  
Thanks.

Brian Ronk

______________________________________________________
Get your free web-based email at http://www.xoom.com
Birthday? Anniversary? Send FREE animated greeting
cards for any occasion at http://greetings.xoom.com


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019