26 Feb
2004
26 Feb
'04
2:02 p.m.
voodoo4@otenet.gr wrote:
Colin Rafferty wrote:
class Master { // ... shared_array<Slave> sl; };
Master::Master(int val) : sl(new Slave[val]) { }
Master::~Master() { // intentionally left blank! }
It works.Thanks! However i'm still having a problem understanding how i'm going to initialize the Slave array in some other function rather than in initialization, and keep the scope public for the whole Master object(excuse my terminology,i'm not english).
Just like initializing anything else in a different function. extern shared_array<Slave> createSharedArray(); Master::Master(int val) : sl(::createSharedArray()) { } -- Colin