How can I take the name of histogram in .txt file?

[size=142]we acquired the data (.dat) , stored in a folder and put the name in a (.txt) file.
Which is the command to be used in my program ROOT to take the name of the file in a (
.txt) file and use it in my histogram. ?
I tried with the command below. It opened the file (.txt) but can not take the name of the file.dat

[size=142]perhaps there is better solution than that which I want to use?[/size]


you could use proper C++; check google or a C++ book on how to use e.g. ifstream.

Cheers, Axel.

[size=150]with C++ it is very very easy.
Thanks for having remind me[/size]