using namespace std; you will have to explicitly add std:: before anything in the std namespace. |
|
std::. |
|
| co1ote wrote: |
|---|
#include <iostream.h> // with ".h" will say that it is deprecated |
|
|
using namespace std to use the members of that header. This: |
|
| Additionally the 1990 C standard defined a number of header files with .h. These header files have been incorporated into the 1998 C++ standard and they still work. However, with the new thought that standard C++ header files should not have .h, the same files can also be included without .h, but they do need a "c" prefix then. Moreover, all standard C++ functions and symbols reside in the namespace "std" now, although the old-style header files still reside in the global namespace. For instance in C++ the following 2 code fragments are equivalent: #include <stdio.h> scanf("%d", &number); #include <cstdio> std::scanf("%d", &number); Note that non-standard C++ header files are conventionally still written with .h, such as <windows.h> and any header file that you introduce yourself. |