[C++-sig] Polymorphism and Dangling Reference exception

Garrick Chin nonexistent.ftp at gmail.com
Thu May 18 21:54:53 CEST 2006


On 5/18/06, Roman Yakovenko <roman.yakovenko at gmail.com> wrote:
> On 5/18/06, Garrick Chin <nonexistent.ftp at gmail.com> wrote:
> >
> > class Circle(test.Shape):
>
> You should call the __init__ of the test.Shape
>
>         def __init__( self ):
>               test.Shape.__init__( self )
>
> >     def draw(self, param):
> >         return "circle: " + param
> >
> > What would be causing this exception?  Thank you for your time.
>

After adding the  __init__() explicitly as you have shown I am still
receiving the exact same error.  :(

> You can try to use pyplusplus, it will save you a lot of time. It has nice GUI
> ( http://language-binding.net/pyplusplus/tutorials/tutorials.html )
> so the learning curve should be short.
>
> --
> Roman Yakovenko
> C++ Python language binding
> http://www.language-binding.net/
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>

Thanks for the link, but I prefer wrapping with boost::python manually
(although I'm not sure why).



More information about the Cplusplus-sig mailing list