[C++-sig] boost python references
stummer at gmail.com
Sat Apr 15 20:13:36 CEST 2006
i am trying to use references with boost python.
in python you can do:
because b is a reference, it will always change as a changes. hence
b.nameis also john.
i want this functionality between boost and python.
I have the C++ class:
where seat is an object of class Seat. Seat contains an integer attribute
named position. It's default value is 45.
My python code is
print s.position # prints 45
print w.seat.position # prints 45
print s.position # prints 66
this shows that it isn't passed by reference as print w.seat.position needs
to be 66
How can i used references?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cplusplus-sig