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 <<
This is a discussion on File program doubt within the C++ Programming forums, part of the General Programming Boards category; But both results in processing last line twice, because getline return value is not checked before calling cout << Yes, ...
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 <<
C + C++ Compiler: MinGW port of GCC
Version Control System: Bazaar
Look up a C++ Reference and learn How To Ask Questions The Smart Way
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
If I have eight hours for cutting wood, I spend six sharpening my axe.
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.