|
|
Warp wrote:
> Orchid XP v8 <voi### [at] devnull> wrote:
>> Tree t = build_tree(symbols);
>
> In this case the error messages given by valgrind wouldn't have been
> the clearest possible, but they nevertheless point to this line being
> the ultimate culprit (which, ultimately, is caused by build_tree() returning
> a reference to a local variable).
Yeah. I guess since the error only came to light when I added a new
function, I assumed that the new function must be the problem. In fact
it was just exhibiting a problem that already existed...
> Anyways, I'm wondering why you are passing the parameter by value rather
> than by const reference...
Ooo, well spotted. That's simply an oversight on my part. Since all the
syntax is still kinda new to me, I keep forgetting to write bits. (E.g.,
the compiler keeps complaining that I'm using signed integers to index
things.)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|