[prog] Another C++ problem
Sue Stones
suzo at bigpond.net.au
Wed Apr 23 12:46:21 EST 2003
Oh thank-you so much, I was getting frustrated last night, which becomes a
positively reinforcing process. I think that I am almost there so I try
harder. Sometimes a break is more productive. But I don't like to put it
asside because I am likely to get waylaid by other things and then other
presures come along and days, weeks and months slip by.
Thank-you for all you comments, I will now go through these 2 programs again
and use the insights that you have given me. (And I am going to relax and
not expect it to all make sence for about 2 months - a little at a time. I
think that I had unrealistic expectations).
sue
On Wed, 23 Apr 2003 08:46 am, Robert J. Hansen wrote:
> > fstream inFile; // I spent ages trying to get ifstream to
> > work
>
> Remove this line and things should work much better. You're creating an
> object which shadows an identical object declared as a class member. So
> sure, you're opening up _this_ inFile, but the _member_ inFile never
> gets opened.
>
> It should also be an ifstream--the code I sent you off-list has examples
> of how to use ifstreams.
More information about the Programming
mailing list