help-octave
[Top][All Lists]
Advanced

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

Re: Compiling old OCT files


From: John W. Eaton
Subject: Re: Compiling old OCT files
Date: Thu, 9 Sep 2004 15:55:09 -0400

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
-------------------------------------------------------------



reply via email to

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