[prev in list] [next in list] [prev in thread] [next in thread]
List: boost-users
Subject: [Boost-users] shared_ptr/shared_array Question - SOLVED
From: "voodoo4" <voodoo4 () otenet ! gr>
Date: 2004-02-26 17:27:07
Message-ID: 001b01c3fc8d$c5544b50$23e2cdd4 () voodoo
[Download RAW message or body]
*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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic