I am new to comp science so your ideas would be helpful a good deal. Personally i thought that it can be achieved using a batch script but wonder if it can be done using C++ as i want the final tool to be an .exe file which perform the above intended operation when executed.
I wanted to do this either by batch file or c++. However, i just got my purpose solved using dos commands(batch file), i could well understood your responce in the other forum. Reading more about File I/O operation in C++..
For some reason, the guys at MS just can't fathom that anyone would still want to use cmd.exe to do this kind of thing, so some things are still impossible with pure cmd. Like reading blank lines from a file.
(Otherwise it wouldn't take much to write a batch script to do it... maybe 60 or 70 lines for general code; maybe a third that for your specific need.)
To be fair, Unix shells can't do it either. The difference is that on Unix you can generally expect utilities like sed to be present. You can get versions that work on DOS/Win32, but you simply cannot expect your end user to have it.