
30 Jan
2013
30 Jan
'13
6:59 p.m.
young wrote:
What is wrong with:
boost::scoped_ptr<byte> buff[10]; for(int i=0; i<10; i++) { int size = 2*i + 100; buff[i] = boost::scoped_ptr<byte>(new byte[size]); } ...
I agree with what Igor wrote. You could also use scoped array and change
your code thus:
#include