Is it possible in c++ to read or write to the name of a file?

Thanks in advance!