On Thu, Sep 04, 2003 at 03:40:18PM +0100, David Cantrell wrote: > It's just this sort of thing that makes me lurve perl.
you mistyped "C++". class fleeg { }; class quirka { public: quirka () { f = auto_ptr<fleeg> (new fleeg); } private: auto_ptr<fleeg> f; }; class miner { public: miner () { q = auto_ptr<quirka> (new quirka); } private: auto_ptr<quirka> q; }; auto_ptr<miner> smith (surbiton_context * context, int * error) { auto_ptr<miner> foo; try { foo = auto_ptr<miner> (new miner); } catch (bad_alloc e) { *error = ENDORIAN; return foo; } ..... return foo; } HTH. HAND. -- Phil Lanch 0xD78D598DA6635CF32AB24593C98994B7D95B33E3 (i even know the passphrase: http://www.subtle.clara.co.uk/rephrase ) "If you tell a lie big enough and keep repeating it, people will eventually come to believe it." -- Joseph Göbbels