*Colin Rafferty wrote:*
Just like initializing anything else in a different function.
extern shared_array<Slave> createSharedArray();
Master::Master(int val) : sl(::createSharedArray()) { }
Well it is not what i meant but it doesn't really matter cause i solved my problem. I just had to do a simple cast...Duh! And for anyone interested: //A macro to to shorten the shared_array template code.Not really strong typed... #define SM_A(x) boost::shared_array<x> class Slave { Slave(){ }; ~Slave(){ }; }; class Master { public: Master(){ }; ~Master(){ }; void SomeFunction(int val){ sl = SM_A(Slave)(new sl[val];}; SM_A(Slave) sl; }; As i suspected.I'm an idiot who's bothering other people with his ridiculous problems... Thanks for your replies.