[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to return vector of strings?
From: |
Tom Goles |
Subject: |
how to return vector of strings? |
Date: |
Tue, 22 Apr 1997 12:57:55 -0400 |
Hi,
I'm trying to return a vector of character strings from dynamically
loadable c++ function (.oct file).
For example, if my function is called 'Test' then from octave I'd like
to call it as follows:
octave> a = Test()
a =
Hello
world
octave>
In other words, the vector that gets returned should be the same as if
I simply typed:
octave> a = ["Hello";"world"]
a =
Hello
world
octave>
My problem is that I don't know which octave c++ class i'm supposed to
use to achieve this result. I have string values stored in regular 2-d
c char array and need to copy them to some octave class which will then
be returned to octave.
Any help/examples would be appreciated.
Thanks,
Tomislav Goles
ps. BTW, I have no trouble returning vectors of real numbers from dynamically
loaded functions - for that I used ColumnVector class (as shown in the
oregonator.cc example).
- how to return vector of strings?,
Tom Goles <=