+ 4

Can we use <iostream> instead of <iostream.h> in c++ ?

3rd Apr 2018, 3:48 PM
Vishal Singh
Vishal Singh - avatar
5 odpowiedzi
+ 10
iostream is part of the standard library, you can see iostream.h in old programs, before iostream began part of the standard. no reason to use it today, but if you want.. remember iostream.h has not namespace std
3rd Apr 2018, 4:41 PM
AZTECCO
AZTECCO - avatar
+ 5
@Jakob Marley In SL compiler (which I think is GCC), iostream.h does not work. It might on some compilers, but a lot don’t support it anymore.
3rd Apr 2018, 4:06 PM
Jacob Pembleton
Jacob Pembleton - avatar
+ 3
Why would you want to? iostream.h is deprecated in favor of iostream. However, to the best of my knowledge, you can still use iostream.h. However, for the sake of your learning, don't use the stuff from the past that has been deprecated today.
3rd Apr 2018, 3:52 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 3
@Jacob Nice name, btw. :) Gotcha. I wasn't sure if anyone still supported it, but I know in the new standards they don't mention it at all, so it's always good choice to use what's supported over something that has no future. Thanks for the info though!
3rd Apr 2018, 4:10 PM
Fata1 Err0r
Fata1 Err0r - avatar