Re: fstream vs ifstream/ofstream (and other things about your code)
(Login MCalkins) C-Forum Posted May 2, 2011 9:20 AM
>the invalid use of `new SalesRecs' with `delete SalesRecs')
That was my bad.
With regard to OpenRecords returning an object instead of a pointer, I had changed it to return a pointer in the version I was working with, but then discarded the changes in favor of the older code and "delete &fileStream;". Would that work? (I would think using the address of operator that way would do the trick. Or, is returning a reference of an object not the same as returning an object?) Even if it does, though, it would seem better to just return a pointer...