fstream + vector
-
if i try to include fstream.h and vector.h like this #include #include some error occured, what should i do?
-
if i try to include fstream.h and vector.h like this #include #include some error occured, what should i do?
The standard library include files don't end in ".h". Use
#include <vector>
instead, for example.Steve
-
if i try to include fstream.h and vector.h like this #include #include some error occured, what should i do?
Could you be more specific about the error that occurs? Cause, I don't agree with Steve about the .h .... I mean I use it all the time and it work ???? Sorry My bad Steve ... are you talking about the vector header file??? If you are ... my bad.
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
-
Could you be more specific about the error that occurs? Cause, I don't agree with Steve about the .h .... I mean I use it all the time and it work ???? Sorry My bad Steve ... are you talking about the vector header file??? If you are ... my bad.
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
Programm3r wrote:
Could you be more specific about the error that occurs? Cause, I don't agree with Steve about the .h .... I mean I use it all the time and it work ????
Steve is right, you shouldn't use .h with the standard C++ Library. Older compilers may ship with both fstream.h and fstream, but VS05 does not. Before C++ got standardized, C++ headers files were still like C headers, with .h extension. But the standard C++ put all those header files under std namespace, so they rename all of them without .h extension.
-
Programm3r wrote:
Could you be more specific about the error that occurs? Cause, I don't agree with Steve about the .h .... I mean I use it all the time and it work ????
Steve is right, you shouldn't use .h with the standard C++ Library. Older compilers may ship with both fstream.h and fstream, but VS05 does not. Before C++ got standardized, C++ headers files were still like C headers, with .h extension. But the standard C++ put all those header files under std namespace, so they rename all of them without .h extension.
Like I said .... " My bad " .... :)
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
-
Could you be more specific about the error that occurs? Cause, I don't agree with Steve about the .h .... I mean I use it all the time and it work ???? Sorry My bad Steve ... are you talking about the vector header file??? If you are ... my bad.
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
Programm3r wrote:
Cause, I don't agree with Steve about the .h .... I mean I use it all the time and it work ????
Then you don't have VS2005. The standard headers do not have .h, and the non standard headers are finally gone in VS2005.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog