Yes, I pointed that out earlier; that's why they are only somewhat correct.But both results in processing last line twice, because getline return value is not checked before calling cout <<
Yes, I pointed that out earlier; that's why they are only somewhat correct.But both results in processing last line twice, because getline return value is not checked before calling cout <<
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
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
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
These two have different meaningyou can write it as d:t1.txt as well as d:\t1.txt
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.