Re: va_list length and variable len parameters in macro
From: Simon Trew (noneofyour_at_business.guv)
Date: 10/29/04
- Next message: Simon Trew: "Re: Template specialization to get just-wide-enough integer"
- Previous message: Nagulmeera: "Re: How can i insert an item in widows desktop popupmenu"
- In reply to: Igor Tandetnik: "Re: va_list length and variable len parameters in macro"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 29 Oct 2004 10:40:30 +0100
It does actually, at least here (WinXP SP1 with VC6). I thought of this but
I did think it was a command-line thing, not an OS/filesystem thing. There's
no unaccounted-for file starting with 'nul' on my drive, so I guess it
really is the nul output device.
This example works:
#include <stdio.h>
int main(int argc, char* argv[])
{
size_t chars(0);
FILE* fNul;
fNul = fopen("nul:", "w+");
if (fNul)
{
chars = fprintf(fNul, "Hello World!\n");
fclose(fNul);
}
return chars;
}
At the point of return, chars = 13.
"Igor Tandetnik" <itandetnik@mvps.org> wrote in message
news:e5%234wcFvEHA.1400@TK2MSFTNGP11.phx.gbl...
> "hs" <who_ami@o2.pl> wrote in message
> news:opsgiplhm7l1n1w0@hs2.biatel.signum.pl
> > on linux I do vfprintf to /dev/null that returns number of bytes
> > written. is there such a "null" file on windows?
>
> There's nul: device - at least it works from the command line, I've
> never tried to fopen it.
> --
> With best wishes,
> Igor Tandetnik
>
> "On two occasions, I have been asked [by members of Parliament], 'Pray,
> Mr. Babbage, if you put into the machine wrong figures, will the right
> answers come out?' I am not able to rightly apprehend the kind of
> confusion of ideas that could provoke such a question." -- Charles
> Babbage
>
>
- Next message: Simon Trew: "Re: Template specialization to get just-wide-enough integer"
- Previous message: Nagulmeera: "Re: How can i insert an item in widows desktop popupmenu"
- In reply to: Igor Tandetnik: "Re: va_list length and variable len parameters in macro"
- Messages sorted by: [ date ] [ thread ]