#include iostream in C?

后端 未结 5 1496
半阙折子戏
半阙折子戏 2021-02-12 22:38

In C++ we always put the following at the top of the program

#include 

What about for C?

5条回答
  •  鱼传尺愫
    2021-02-12 23:22

    Well, this is called the standard I/O header. In C you have:

    #include 
    

    It's not an analog to . There is no analog to iostream in C -- it lacks objects and types. If you're using C++, it's the analog to .

    • stdio man page
    • GNU documentation on Input/Output on Streams

    See also this fantastic question and its answer,

    • 'printf' vs. 'cout' in C++

提交回复
热议问题