Lider

I was using Visual C++ 6.0 and my code is compiling, I just install Visual Studio 2005 and I tried to compile my old app and then I got the next message :

fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory

I have this in my header file

// SAP00012.h : header file

//

#include <fstream.h>

Could you help me

Regards

Lider




Re: Visual C++ General Cannot open include file

TilakGopi

Hi,

Use like this:

#include<fstream>

using namespace std;

Thanx,

Ch.T.Gopi Kumar.






Re: Visual C++ General Cannot open include file

Prasad Somwanshi

VC++ 6.0 compiler is not stricter following C++ ISO standards. Later version of it are more adherent to standards.

So, you need to use

#include <fstream>





Re: Visual C++ General Cannot open include file

Lider

Dear Gopi,

now is working, thank you

but why is the reason to use

using namespace std;

because If I write only #include<fstream> I get errors.

Best Regards

Lider






Re: Visual C++ General Cannot open include file

Lider

Gopi

I used an is working, thank you

but why I have to use using namespace std;

Best Regards

Lider






Re: Visual C++ General Cannot open include file

TilakGopi

Gopi

I used an is working, thank you

but why I have to use using namespace std;

Best Regards

Lider

----------------------

Hi Lider,

Lider , all the definitios of these header files are by default in name space std.It's a new style in C++ , including headers.

Just refere C++ , complete reference by - Bjourne Stroustup.


Thanx,

Ch.T.Gopi Kumar