Re: safe alternative to va_arg
- From: Fabian <Fabian@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 17 Apr 2008 23:36:00 -0700
Hi Uli,
BTW: a very convenient feature of C++ IOStreams is the overloaded rdbuf()
function. Using that, you can easily redirect a stream to stdout, a file or
any other stream:
int main() {
std::ofstream out("program.log");
std::cout.rdbuf(out.rdbuf());
:
Is it possible to redirect the output to multiple targets, e.g. to both a
file and the console?
Thanks,
Fabian
.
- Follow-Ups:
- Re: safe alternative to va_arg
- From: Ulrich Eckhardt
- Re: safe alternative to va_arg
- References:
- safe alternative to va_arg
- From: Fabian
- Re: safe alternative to va_arg
- From: Ulrich Eckhardt
- Re: safe alternative to va_arg
- From: Fabian
- Re: safe alternative to va_arg
- From: Ulrich Eckhardt
- safe alternative to va_arg
- Prev by Date: array variable subscript generate wrong code (2008) ?
- Next by Date: Re: safe alternative to va_arg
- Previous by thread: Re: safe alternative to va_arg
- Next by thread: Re: safe alternative to va_arg
- Index(es):
Relevant Pages
|