you need to put actualReader.close call in else, as the file has open handles and it is not available for open again
Naveed
2010-02-03 04:14:11
you need to put actualReader.close call in else, as the file has open handles and it is not available for open again
I don't know what input you are giving to cin
, but be aware that cin
will stop at the first whitespace character it encounters. For example, if you give as input the following:
C:\Program Files\directory
then aRDataLog
would have the value C:\Program
.
In order to read the whole line, you could use getline.
Check also this post.
While I'm not exactly sure what the issue is here, it might be a good idea to print what you're getting from std::cin
to ensure you're getting what you're expecting.