Hi,
I have a class with private member std::vector<std::vector<TH1F*> > hMissPtCent;
I am trying to initialize this in the constructor simply like hMissPtCent = 0;
. I then call a function that does the following
int MyClass::InitMissMomHistos() {
for(int imom; imom<missMomBins; imom++){
for(int icent=0; icent<ncent; icent++){
sprintf(chMissPtCent,"hMissPt_%i_Cent_%i",imom,icent);
hMissPtCent[imom][icent] = new TH1F(chMissPtCent,chMissPtCent,1000,-100.0,100.0);
}
return 1;
}
Using a makefile, I try to compile but get the following errors
TrigGlobalBranch.C:724: error: no match for 'operator=' in '((TrigGlobalBranch*)this)->TrigGlobalBranch::hMissPtCent = 0'
/afs/cern.ch/sw/lcg/contrib/gcc/4.3.2/x86_64-slc5-gcc34-opt/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../../include/c++/4.3.2/bits/vector.tcc:144: note: candidates are: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector<TH1F*, std::allocator<TH1F*> >, _Alloc = std::allocator<std::vector<TH1F*, std::allocator<TH1F*> > >]
any ideas on what the problem is?