From: Alcaraz Newsgroups: comp.os.linux.development.apps,comp.os.msdos.djgpp,comp.unix.programmer Subject: Re: C++ Passing ostreams by reference to methods, problem Date: Thu, 29 May 1997 13:51:00 -0500 Organization: ITESM Campus Monterrey . DINF-DTCI Lines: 18 Message-ID: <338DD014.15FB@campus.gda.itesm.mx> References: <01bc6b49$27fce100$1b2443a1 AT pcoec DOT uclm DOT es> NNTP-Posting-Host: galileo.gda.itesm.mx Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Pues me imagino que estos es lo que quieres: #include #include void escribe (ofstream *file){ *file << "Prueba"; } void main(){ ofstream file("salida"); escribe(&file); file.close(); } Esto si funciona perfectamente.