Dir->cd() - does not change directory

Hello,

I can not change the directory inside the root file.

TFile* file = new TFile(pathToRootFile.ascii());
TDirectory* dir = (TDirectory*)file;
dir->cd("/etaphi_clus_/Results/Status/") //gives 1 as result, no errors
cout<<(dir->GetPath())<<endl; // prints C:/path/file.root:/

Does anybody know why is that?
Thank you!


WinXP Home, MS VS2003, ROOT v.5.18 w/ Qt package

Cheers,
Philippe

You are right, it works now. :slight_smile:

Thank you!