Fstream Problems using VC++ 4 
Author Message
 Fstream Problems using VC++ 4

I am writing some code to read data from a text file.  I am writing the
program using Visual C++ 4.  The program is dialog based.  I use fstream's
to read and write information to a text file.  Originally, I put the code in
one of the dialog classes to read from the text file.  I had no problems
with this.  Later, I created a class called file to deal with reading and
writing information to the text file.  The information being stored is the
data of a student.  This data is stored in a student class.  For some
reason, when I use the same sequence of code within the file class to read
data from the text file, I get an access violation reported by VC++.  The
de{*filter*} stops in the ifstream cod.  It appears to be attempting the getline
function.

I tried this class in a separate program with identical results.

Any ideas?

I am including the class header and code that is causing the problem.

Thanks,
Kevin Hammond,
University of Wisconsin Madison,
Academic Services, Lan Administration


begin 666 file.cpp
<encoded_portion_removed>
end

begin 666 file.h



M;&4H0U-T<FEN9R!P871H+"!#4W1R:6YG(&UO9&4I.PT*"7YF:6QE*"D[#0H)

M;G0J(%)E8613='5D96YT*"D[#0H)=F]I9"!7<FET95-T=61E;G0H<W1U9&5N

M4W1R:6YG(&-U<G)E;G1-;V1E.PT*"7-T=61E;G0J(&YE=U-T=61E;G0[#0H)

`
end
end



Mon, 05 Jun 2000 03:00:00 GMT  
 Fstream Problems using VC++ 4


Quote:
> I am writing some code to read data from a text file.  I am writing the
> program using Visual C++ 4.  The program is dialog based.  I use fstream's
> to read and write information to a text file.  Originally, I put the code in
> one of the dialog classes to read from the text file.  I had no problems
> with this.  Later, I created a class called file to deal with reading and
> writing information to the text file.  The information being stored is the
> data of a student.  This data is stored in a student class.  For some
> reason, when I use the same sequence of code within the file class to read
> data from the text file, I get an access violation reported by VC++.  The
> de{*filter*} stops in the ifstream cod.  It appears to be attempting the getline
> function.
> Any ideas?

Yes. Stay far away from comp.lang.c with this noise and quit bothering us
with your file ``attachments''. Ignorance can be tolerated somewhat but
stupidity can not.

--
========================================================================

       Well...Unix, of course. Because windoze is a pathethic toy...
========================================================================



Tue, 06 Jun 2000 03:00:00 GMT  
 Fstream Problems using VC++ 4


: > I am writing some code to read data from a text file.  I am writing the
: > program using Visual C++ 4.  The program is dialog based.  I use fstream's
: > to read and write information to a text file.  Originally, I put the code in
: > one of the dialog classes to read from the text file.  I had no problems
: > with this.  Later, I created a class called file to deal with reading and
: > writing information to the text file.  The information being stored is the
: > data of a student.  This data is stored in a student class.  For some
: > reason, when I use the same sequence of code within the file class to read
: > data from the text file, I get an access violation reported by VC++.  The
: > de{*filter*} stops in the ifstream cod.  It appears to be attempting the getline
: > function.

: > Any ideas?

: Yes. Stay far away from comp.lang.c with this noise and quit bothering us
: with your file ``attachments''. Ignorance can be tolerated somewhat but
: stupidity can not.

And gratuitous rudeness cannot be tolerated at all.  Almost every post
I read from you is simple abuse; if you wish only to abuse people, please
post to the correct groups (alt.flame.whatever).

: --
: ========================================================================

:        Well...Unix, of course. Because windoze is a pathethic toy...
: ========================================================================

I suppose I should invoke the traditional speeling falme here...

Will



Sat, 10 Jun 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problem using fstream in a library...

2. problem with fstream (VC++6 stlport 3.21)

3. bug in fstream? (works with fstream.h)

4. fstream ./. fstream.h

5. Problem to convert from VC 6.0 to VC 7.1 because of using filebuf::setmode()

6. Beginner: Problems Using OLE Forms using VC++ 4.0

7. Memory Read/write problem using vc++ 6.0

8. Memory Read/write problem using vc++ 6.0

9. Using file streams (fstream) with unicode

10. hot to using fstream to get filesize?

11. How to get file status by using methods of fstream

12. Writing to the A drive using fstream

 

 
Powered by phpBB® Forum Software