|
From: Nick <en...@ho...> - 2000-11-08 19:53:31
|
Hello Chris,
> Just a quick question that has been bugging me!
>
> I if compile the program:
>
> #include <iostream>
>
> int main()
> {
> cout << "Hello World!\n";
> return 0;
> }
>
> It works perfectly! But surely it should fail because I have used the
> new style header files that are placed in namespace std. Being as I
> have not added 'using namespace std;' to my program - why does it
> work?! I though you had to qualify each function with std::
>
> Im sure there is a good reason for this - Im just interested!
>
The short answer for this is "legacy code." Without going into too
much detail, and ultimately leaving something out, here is a link to
a number of pages and discussions on this:
http://www.google.com/search?q=%22-fhonor-std%22
The compiler option is "-fhonor-std" but in order for it to work
correctly, your library must have been built with this flag.
regards,
Nick
|