when i run my code i found a null pointer in the line following :
TFile * file = new TFile("ResultData18JUL.root", "READ");
TIter nextkey(gDirectory->GetListOfKeys());
TKey* key;
while (key == (TKey*)nextkey()){
if( !strcmp( key->GetName(), "OutputCent0_10")){
TList * V0Xi = (TList*)key->ReadObj();
could someone give a suggestion?
Thanks
it could be almost anything. you didnt check that your file opened correctly.
nextkey uses something we don't know what is.
key ==, key had no value (not initialized) and probably bug (agree with earlier post)
assumes key is valid and dereferences it in strcmp