+ 1

What is the difference between #include<iostream.h> & #include<iostream> using namespace syd; ?

C++ pre processor directives

19th Feb 2017, 1:24 PM
Samarth Sharma
Samarth Sharma - avatar
3 ответов
+ 3
Ya " #include<iostream> using namespace std; " it is used to remove scope resolution (::) in the program. if there is no "using namespace STD" in program you have to use STD::COUT<<"HELLO" and if there is "using namespace std " in program then you have to use only COUT<<"Hello"
19th Feb 2017, 1:31 PM
Arya DRJ
Arya DRJ - avatar
+ 1
Thanks bud
19th Feb 2017, 1:32 PM
Samarth Sharma
Samarth Sharma - avatar
0
All these headers, that have no ".h" prefix, are from modern C++ standard library. But those with it are left there for compatibility with older C++ library standard and you shouldn't use them normally.
19th Feb 2017, 1:49 PM
Paul Kazakof
Paul Kazakof - avatar