What exactly is the FILE keyword in C?

后端 未结 4 894
无人共我
无人共我 2020-11-30 02:54

I\'ve started learning some C as a hobby and have blindly used FILE as a declaration for file pointers for quite some time, and I\'ve been wondering. Is this a keyword or sp

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-30 03:16

    It's a special data type. It contains a file handle as well as various flags used internally by the various stdio calls. You'll never need to actually know what's in it, just that it's a data type that you can pass around.

    http://www.cplusplus.com/reference/clibrary/cstdio/FILE/

    However if you're interested, here's what it looks like:

    http://en.allexperts.com/q/C-1587/2008/5/FILE-Structure.htm

提交回复
热议问题