+ 3

What is the difference between <iostream> and <iostream.h>

8th Jun 2017, 2:12 PM
HeniX
HeniX - avatar
5 Answers
+ 5
iostream.h is the old old way of referencing iostream. But using #include <iostream.h> is prestandard I believe (like before 1998)
8th Jun 2017, 2:22 PM
jay
jay - avatar
+ 9
iostream.hĀ is pre-standard C++. It means that when you do aĀ #include <iostream.h>, the preprocessor shall search for theĀ iostream.hĀ file and then includes it in your program iostreamĀ is a standard header. It doesnt mean that it shall append aĀ .hĀ and then includeĀ iostream.hĀ file. We usedĀ iostream.hĀ before namespaces were introduced. So if you have aĀ iostream.hĀ file lying around, you can still include it. But it wont be in theĀ stdĀ global namespace.
8th Jun 2017, 2:22 PM
The Search
The Search - avatar
+ 7
yup
8th Jun 2017, 2:24 PM
The Search
The Search - avatar
+ 5
@Anand. Did not know they were different files. Thanks
8th Jun 2017, 2:23 PM
jay
jay - avatar
+ 3
thanks Guys
8th Jun 2017, 2:24 PM
HeniX
HeniX - avatar