devxlogo

The Difference Between #include <iostream> and #include

The Difference Between #include <iostream> and #include

If a compiler supports both and , the headers are subtly different.In particular, if you include , you get the elements of the iostream library enclosedwithin the namespace std. If you include , you get those same elements at global scope.

Getting them at global scope can lead to name conflicts?precisley the kinds of name conflicts the use of namespaces is designed to prevent.

devx-admin

Share the Post: