[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiling old OCT files
From: |
E. Joshua Rigler |
Subject: |
Re: Compiling old OCT files |
Date: |
Thu, 09 Sep 2004 14:19:06 -0600 |
Thanks to all for your feedback. My old code is working perfectly now
due to everyone's great advice. How easily and quickly one forgets
one's real programming skills (i.e., C/C++/Fortran) when spoiled by such
a wonderful high-level numerics tool like Octave :^).
-EJR
On Thu, 2004-09-09 at 13:55, John W. Eaton wrote:
> On 9-Sep-2004, Eric S Fraga <address@hidden> wrote:
>
> | There is also a c_str() method in std::string which may do some of what you
> | want with the string from Octave:
> |
> | std::string fn = args(0).string_value();
> | char * s = fn.c_str();
>
> This works if S is "const char*", but not if it is "char*". In that
> case, you need to allocate some space and make a copy.
>
> jwe
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------