Can I get a file name or its path from a fstream object? I looked through the methods of fstream and didn\'t find anything close to it.
fstream
you may also design a little class which inherits from fstream and behaves like a fstream but also stores its file name.