Why would "fopen(stdin,"rb")" fail?



I am doing the following:

fclose(stdin);
FILE* fp=fopen(stdin,"rb");

The compiler complains as follows:
error C2664: 'fopen' : cannot convert parameter 1 from 'FILE *__w64 ' to 'const char *'

Since it has no complain about the fclose(), why would it complain about fopen?

My purpose is to check the input queue from keyboard, w/o waiting for the user

pressing Enter and actually w/o waiting at all - either there is a char in the buffer or not

so that I can also count a timeout.



Thanks,

David


.



Relevant Pages

  • Re: Why would "fopen(stdin,"rb")" fail?
    ... 'const char *' ... Since it has no complain about the fclose(), ... My purpose is to check the input queue from keyboard, w/o waiting for the ...
    (microsoft.public.vc.language)
  • Re: hello,
    ... saying what it does, and ... code for this purpose in this group? ... Personally, I have never seen anybody complain about it in almost 10 years of Usenetting. ...
    (comp.lang.javascript)
  • Windows Vista Forum ( Community Bulletin Board )
    ... The purpose of the forum is to read about, talk about, comment about, ... complain about, ask questions about, and get answers about the ... Microsoft Windows Vista operating system. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Food-based Laetrile -- Nutrient that Reduces Cancer Risk
    ... pubescent attacks on others. ... that purpose, knock yourself out. ... Complain to all who do it, ...
    (misc.health.alternative)
  • Re: Y&R Mary jane has gone crazy
    ... They're doing it on purpose so no one will complain when the show goes ... off the air. ... NBC did it with AW in 1999. ...
    (rec.arts.tv.soaps.cbs)