I´m sorry for not check the old mails first. Thanks P.D., it works well
fine.
Esteban
----- Original Message -----
From: "P.D. van Zelst" <pa...@my...>
To: "'Esteban Valverde'" <est...@ho...>;
<dev...@li...>
Sent: Monday, 25 August, 2003 14:03
Subject: RE: [Dev-C++] Redirection of standard error
I think this has already been answered/discussed before, but anyway,
here goes:
#include <iostream>
#include <fstream>
int main()
{
std::ofstream out("somefile.txt");
std::streambuf* buf = out.rdbuf();
std::cerr.rdbuf(buf);
cerr << "This will get written to 'somefile.txt', instead of
stderr" << endl;
return 0;
}
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Esteban
Valverde
Sent: Monday, August 25, 2003 3:45 PM
To: dev...@li...
Subject: [Dev-C++] Redirection of standard error
Hi, how can I do to redirect cerr in my programs to get all the errors
in a
text file ?
thanks, Esteban
_________________________________________________________________
¿Estás buscando un auto nuevo? http://www.yupimsn.com/autos/
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|