The same, really. You need to manipulate the global variable gEnv:gEnv->SetValue("TFile.Recover", 0); // or 1 to turn it onbut it looks like due to a typo in the previous message say GetValue where SetValue was needed.
In general I don’t quite understand all these global variables such as
gROOT, gSystem etc.
when you run in compiled c++ code.
Ok, you define the object for example TSystem * syst = new TSystem()
and you play as in an interpred enviroment, but I don’t fully know
what I am doing…
All the global variable/object (gROOT, gSystem, gEnv, etc.) that provide static services are prebuilt and you never need to allocate them (gSystem’s actually type depends on the platform for example).
Other variables that indicates/points to a state (like gDirectory and gFile) can be manipulated directly but will also be automatic updated (for example both are changed when you executed TFile *f = TFile::Open(…) to have the same value as ‘f’ which becomes the current directory).
Either way, to use them in compiled code, all you need to do is #include the corresponding header file.