1. error C2871: ' STD ': does not exist or was not a namespace
The original C + + has two different versions of the header file. The concept of introducing namespaces was previously compiled with # include <IOSTREAM.H>, while the concept of the namespace was introduced after the first name of the STD namespaces became <iostream>. <iostream.h> is the older C + + header file version, and namespace was added to the C + + standard in 98, so there is no Std namespace in <iostream.h>, when using < Iostream.h>, it is equivalent to calling library functions in C, using the global namespace, which is the earlier C + + implementation. Header file <iostream> does not define a global namespace and must use namespace Std to use cout correctly.
vc6.0 supports this two version. But it's all in <iostream>.
So just change the above statement to:
#include <iostream>
using namespace Std;
or #include <iostream.h>.
Summary of common errors in C + +