473,498 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fstream.h in .Net 2003

Trying to compile a project created by V Studio 6.0 and
compiled then with .Net 2002, I have a problem with 2003
Compiler could not find fstream.h :
line #include <fstream.h> gives fatal error.

How to fix it.
Thanks
Nov 16 '05 #1
5 6360
I tried to use :#include <iostream> using namespace std;
but then had a problem defining "istream file"
error C2079: 'CAlgoticksDoc::m_InRuleTextFile' uses
undefined class 'std::basic_ifstream<_Elem,_Traits>'

Thanks
-----Original Message-----
Trying to compile a project created by V Studio 6.0 and
compiled then with .Net 2002, I have a problem with 2003
Compiler could not find fstream.h :
line #include <fstream.h> gives fatal error.

How to fix it.
Thanks
.

Nov 16 '05 #2
You're on the right track. You need to #include <fstream> (no .h) though.
-cd

dave wrote:
I tried to use :#include <iostream> using namespace std;
but then had a problem defining "istream file"
error C2079: 'CAlgoticksDoc::m_InRuleTextFile' uses
undefined class 'std::basic_ifstream<_Elem,_Traits>'

Thanks
-----Original Message-----
Trying to compile a project created by V Studio 6.0 and
compiled then with .Net 2002, I have a problem with 2003
Compiler could not find fstream.h :
line #include <fstream.h> gives fatal error.

How to fix it.
Thanks
.

Nov 16 '05 #3

"dave" <da*******@yahoo.com> wrote in message
news:0d****************************@phx.gbl...
I tried to use :#include <iostream> using namespace std;
but then had a problem defining "istream file"
error C2079: 'CAlgoticksDoc::m_InRuleTextFile' uses
undefined class 'std::basic_ifstream<_Elem,_Traits>'


#include <fstream>
Nov 16 '05 #4
<fstream.h> is deprecated and no longer available with the latest compilers.
All it did (or should have done ) was load <fstream> for you and lift it
into the global namespace.

"dave" <da*******@yahoo.com> wrote in message
news:20*****************************@phx.gbl...
Trying to compile a project created by V Studio 6.0 and
compiled then with .Net 2002, I have a problem with 2003
Compiler could not find fstream.h :
line #include <fstream.h> gives fatal error.

How to fix it.
Thanks

Nov 16 '05 #5
Brad wrote:
<fstream.h> is deprecated and no longer available with the latest
compilers. All it did (or should have done ) was load <fstream> for
you and lift it into the global namespace.


Conceptually that's almost true, but in fact the IOStreams implementation
usually provided by <fstream.h> differed from standard IOStreams is several
fundamental ways.

- It was not standardized.
- It was not template-ized.
- There were a variety of differences in the details of opening files.
- There were differences in the handling of locales.

-cd
Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2256
by: Frédéric Manzanares | last post by:
hello, my problem: I want to habe one Class with write and read in a file. i have overloaded the operator >> and <<. class c_File { public : fstream fs;
3
3711
by: John R. Delaney | last post by:
If I try to declare an object of type fstream (or ofstream), I run into a compilation error refering to an __something function or variable. Please note, I am including <fstream>, not <fstream.h>....
3
7102
by: Catweasel | last post by:
I'm new to C++ and have been chucked in at the deep-end. I have a C++ console app that works fine. All I want to do is write to file however as soon as I include the fstream library and try to...
4
4820
by: nils | last post by:
Hi all, Recently I started migrating a gcc project to Visual Studio C++ (dotnet). The problem is that I cannot include any iostream header-file: #include <fstream> int main (int argc, char *...
9
5265
by: Someonekicked | last post by:
In my program, I need to open multiple files, and I wont know till after the program execution how many of them (user will enter that value). So I am using a vector of fstream. I am using fstream...
1
5329
by: MForey | last post by:
I'm attempting to create a program that uses fstream objects to read/write to files. However, it is currently balky at best. The fstream.write call doesn't return an error, but the modified data...
6
17091
by: wiso | last post by:
My problem is this (from: http://www.cplusplus.com/ref/iostream/fstream/open.html) #include <fstream> using namespace std; int main() { fstream f;
5
4145
by: neowillis | last post by:
code: #include <iostream> #include <fstream> #include <string> using namespace std; int main() {
6
3718
by: Gaijinco | last post by:
Should this do something? #include <fstream> #include <string> int main() { std::fstream filestr ("test.txt", std::fstream::in | std::fstream::out); std::string s="";
0
7005
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7210
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6891
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7381
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5465
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4916
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4595
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3087
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1424
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.