470,858 Members | 1,731 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,858 developers. It's quick & easy.

Error While building application on Visual Studio 2005(64-bit).

I am building a application on Visual studio 2005.

I have included file #include<fstream> with using namespace std.

& I am getting errors like :
error C2039: 'openprot' : is not a member of 'std::basic_filebuf<_Elem,_Traits>'
error C2039: 'nocreate' : is not a member of 'std::basic_ios<_Elem,_Traits>'

The same application is building on 32 bit windows(where I have included fstream.h)

Please Help
Jan 11 '08 #1
1 4009
9,208 Expert Mod 8TB
fstream.h is pre-ANSI C++ from before 1998.

Change your code to include <fstream> and see if ti still compiles.

fstream.h is not compatible with fstream.

You have to use consistent headers. Either use the archeological relics or use the ANSI headers and the std namespace.
Jan 11 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by . . | last post: by
2 posts views Thread by Michelle A. | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.