RE: [Dev-C++] Redirection of standard error
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: P.D. v. Z. <pa...@my...> - 2003-08-26 14:09:38
|
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 =3D 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=20
text file ?
thanks, Esteban
_________________________________________________________________
=BFEst=E1s 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
|