
27 Jan
2010
27 Jan
'10
12:32 a.m.
"Patrick Horgan"
I don't see any use to the open() method on a file object. What does this object represent, when constructed without a filename? This is what boost::optional is for. What about after a close() and a subsequent open() in a routine processing a series of files?
typedef std::vectorstd::string CStringVector; CStringVector sFileNames; for (CStringVector::const_iterator p = sFilenNmes.begin(), pEnd = sFileNames.end(); p != pEnd; ++p) { CFile sFile(*p); // use sFile here }