saving . . . saved About header file has been deleted. About header file has been hidden .
About header file
Title
Question
why you didn't include .h in header file<iostream> ??
we can use without it ?

C-and-C++ First-C++-Program 01-02 min 0-10 sec 30-06-14, 2:18 p.m. praveenkoumar

Answers:


#include <iostream>, it differs from standard behavior.

The headers in ISO Standard C++ don't have a .h suffix. This is something the standards committee changed from former practice. The details are different between headers that existed in C and those that are specific to C++.


The C++ standard library is guaranteed to have 18 standard headers from the C language. These headers come in two standard flavors, <basename> and <basename.h>(where basename is the header, such as stdio, iostream etc.) These two flavors are identical except the <basename> versions provide their declarations in the std namespace only. And the <basename.h> versions make them available both in std namespace and in the global namespace. The committee did it this way so that existing C code could continue to be compiled in C++. However the <basename.h> versions are deprecated, meaning they are standard now but might not be part of the standard in future revisions.

30-06-14, 3:35 p.m. Ashwini


Log-in to answer to this question.