help-octave
[Top][All Lists]
Advanced

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

Placing structs in cell arrays


From: John Swensen
Subject: Placing structs in cell arrays
Date: Mon, 12 Feb 2007 23:22:04 -0500
User-agent: Thunderbird 1.5.0.9 (Macintosh/20061207)

I am having trouble placing a struct/Octave_map in a cell array in C++. Here is a snippet of my code.

       Matrix handleVec = args(0).matrix_value();
       Cell retval(num_handles);
       for( int i = 0 ; i < num_handles ; i++ )
       {
           handlePtr = handle::getHandle( (int)handleVec(i) );
           Octave_map retvalItem = handlePtr->generateStruct();
           octave_stdout << "BEFORE" << endl;
           retval(i) == octave_value(retvalItem);
           octave_stdout << "AFTER" << endl;
       }

with the following output (for num_handles = 2):

BEFORE
error: binary operator `==' not implemented for `matrix' by `struct' operations
AFTER
start struct gen
BEFORE
error: binary operator `==' not implemented for `matrix' by `struct' operations
AFTER


I tested from the octave prompt and I can put a struct in a cell array from there, so I am not sure what I am doing wrong.

John Swensen


reply via email to

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