Today, I am bored using the exercises C ++ in VC 6.0.Program.
Compilation error:
Cannot open include file: 'streambuf': no such file or directory !!
Checked
Convert the two statements
[# Include <iostream>
Using namespace STD;]
Change
[# Include <iostream. h>]
That's it!
This is a version issue. Some of the updates are different ......
Comments:
The format of <iostream> and <iostream. h> is different. The former has no suffix. In fact, you can see in your compiler include folder that the two are two files. When you open the file, you will find thatCodeIs different. Suffix. h header file C ++ standards have been explicitly proposed not to support, earlier implementation of the standard library function defined in the global space, declared in the. in the header file with the suffix H, the C ++ standard is used to distinguish it from C, and to correctly use the namespace, it is required that the header file does not use the suffix. h. Because of this, when <iostream. h> when <iostream> is used, it is equivalent to calling the library function in C and using a global namespace, that is, the early C ++ implementation, the header file does not have a global namespace defined. namespace must be used.
STD; in this way, cout can be used correctly.
I personally like Eclipse, which is beautiful and easy to operate. Just install the plug-in, CDT and mingw, and then configure the environment variables (* ^__ ^ ......