Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#include iostream in C?

Tags:

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

#include <iostream>

What about for C?

like image 987
neuromancer Avatar asked Dec 04 '09 01:12

neuromancer


1 Answers

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

#include <stdio.h>

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

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

See also this fantastic question and its answer,

  • 'printf' vs. 'cout' in C++
like image 151
Khaled Alshaya Avatar answered Oct 01 '22 12:10

Khaled Alshaya