Archived

This topic is now archived and is closed to further replies.

stl and <fstream.h>

This topic is 5144 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It seems that some stl templates have the same names as those in and releated includes. When trying to use the two I keep getting ambiguity errors. I''m using MSVC and the ms stl library. How can this be resolved?

Share this post


Link to post
Share on other sites
You should never include fstream.h . You should never use the .h versions of standard library headers. #include <fstream>.


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites
and to expand on that info ... the .h versions of the headers are the older versions, for compatibility with old code, and the new version have no .h - so although programs with or without the .h may work ... there are very few cases where you can mix both versions ... when writing new code, use the standard (non .h) versions ...

Share this post


Link to post
Share on other sites