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?

5th Nov 2019, 3:25 PM
Muhammad Zain Ul Abidin Khan
Muhammad Zain Ul Abidin Khan - avatar
1 Respuesta
+ 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.
5th Nov 2019, 3:36 PM
Avinesh
Avinesh - avatar