Incidentally, that's no typo in the Item title; I really mean <iostream> and not <iostream.h>. Technically speaking, there is no such thing as <iostream.h> — the °standardization committee eliminated it in favor of <iostream> when they truncated the names of the other non-C standard header names. The reasons for their doing this are explained in Item 49, but what you really need to understand is that if (as is likely) your compilers support both <iostream> and <iostream.h>, the headers are subtly different. In particular, if you #include <iostream>, you get the elements of the iostream library ensconced within the namespace std (see Item 28), but if you #include <iostream.h>, you get those same elements at global scope. Getting them at global scope can lead to name conflicts, precisely the kinds of name conflicts the use of namespaces is designed to prevent. Besides, <iostream> is less to type than <iostream.h>. For many people, that's reason enough to prefer it.
iostream.h是vc4.2版本之前的,iostream是之后的,主要是:
4,2版本之后,把standard C++ library加了进来,把原来的C Run_time library 中的iostream library移出,形成了一个单独的库,同时,standard C++ library中也有新的iostream函数,并且这两个新旧版本的iostream库不兼容,不能在同一个程序中调用.