Why we need sometimes to use .h for header e.g <iostream.h> in C++ programming? | Sololearn: Learn to code for FREE!

0

Why we need sometimes to use .h for header e.g <iostream.h> in C++ programming?

#include <iostream.h> This format is said to be used to define header. Is it true that in some compilers the code fails without it?

11/5/2019 3:25:33 PM

Zain Ul Abidin

1 Answer

New Answer

+1

Yes it is very much true and you need those header files because it contains functions and constants that we might want to use in our code. For eg, iostream.h contains functions like cout and cin that we use in our program.