Hi,
I wanted to make my program read the file "input.txt". I did it successfully, but now I want to get the full path of the file "input.txt". Is there any way to do it?
My output should be :
"C:\Documents and Settings\Administrator\Desktop\myfile\debug\input.txt"
@shadow fiend, I don't think he wants that, but i could be wrong?
he wants something to return him the path of where the file is sitting in the file system.
i think there is stuff in boost to do this, and some windows specific functions too.
OP, you'd have to call this before your call to open. on line 4.
and also be aware you could have lots of files called 'input.txt' on your system.
If he's using a framework and a GUI then the class that handles the open file dialog will return the full path to the file selected. Would be handy if we knew whether he was in the terminal or a GUI environment, which OS and what framework he is using...