+ 3

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

8th Jun 2017, 2:12 PM
HeniX
HeniX - avatar
5 Respostas
+ 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