By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,034 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,034 IT Pros & Developers. It's quick & easy.

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

P: 1
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
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 9,197
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.