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: 19 Message-ID: <5441B81CC59BE4A4.36C092E13CDF0BC9.32EBCA2D02F566E9@library-proxy.airnews.net> References: <01bc6b49$27fce100$1b2443a1 AT pcoec DOT uclm DOT es> NNTP-Proxy-Relay: library.airnews.net NNTP-Posting-Host: biceps.gymnet.com 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.