Yes, I pointed that out earlier; that's why they are only somewhat correct.Quote:
But both results in processing last line twice, because getline return value is not checked before calling cout <<
Printable View
Yes, I pointed that out earlier; that's why they are only somewhat correct.Quote:
But both results in processing last line twice, because getline return value is not checked before calling cout <<
Only those intended for DOS/Windows/OS2 - "d:" does not have ANY meaning for paths in for example Linux.
Also:
"fstream.h"
Is old style, new code should use:
<fstream>
[Even if you use old style headers, you should use angle-brackets, not quotes for system headers - and I presume you are not developing your own fstream implementation].
--
Mats
These two have different meaningQuote:
you can write it as d:t1.txt as well as d:\t1.txt