[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

modify in place

From: Ben Sapp
Subject: modify in place
Date: Mon, 27 Nov 2000 17:51:00 -0700

How can I modify a variable that is a new user defined type?  I want to
modify the actuall variable.  I do not want to make another modified
instance of the variable.  I tried the following piece of code and it
compiled fine but, ended up crashing on the line in
"non_const_function()" where I modify some internal variables in

octave_value &rep = const_cast<octave_value&>(args(0).get_rep());
octave_myclass &myclass = (octave_myclass &)(rep);

I want it to work like this from the octave command line:


Now "modify_in_place" does not return any thing it just changes the
value of "a".  


Ben Sapp                         Los Alamos National Laboratory
email: <mailto:address@hidden>   Phone: (505)667-3277
Fax:   (505)665-7920             URL:

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]