1 Apr
2005
1 Apr
'05
7:33 p.m.
I want to write: vector<int> MyClass::MemFunc(const Cartridge&) const; int numCartridges = Cartridge::size(); scoped_array< vector<int> > vectorArray(new vector<int>[numCartridges]); int i = 0; for_each(CartridgeVector::begin(), CartridgeVector::end(), var(vectArray)[var(i)++] = bind(&MyClass::Memfunc, &db, _1)); I already compiled: vector<int>* vectArray = new vector<int>[CartridgeVector::size()] int i = 0; for_each(CartridgeVector::begin(), CartridgeVector::end(), var(vectArray)[var(i)++] = bind(&MyClass::Memfunc, &db, _1)); But when I add in the scoped_array, I can't get it to work. - Sean