4 Sep
2007
4 Sep
'07
10:54 p.m.
On 8/31/07, Jeffrey Jiang
I would rather use a shared_ptr<Character> **characterGrid instead, which bring us back to the problem below.
The problem with your approach is that it depends on dynamically allocating objects that were not meant to be allocated dynamically. The boost::shared_* types are meant to be created on the stack and passed by value. When you start nesting them like that you're going to end up with very confusing deref statements. Technically, I suppose it's feasible. If you really must attempt it, use the typedef statement to make things look a little more sane. James