Why we need sometimes to use .h for header e.g <iostream.h> in C++ programming? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula gr√°tis
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 Resposta
+ 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