[Top][All Lists]

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

Re: Compiling old OCT files

From: Eric S Fraga
Subject: Re: Compiling old OCT files
Date: Thu, 9 Sep 2004 19:56:34 +0100
User-agent: Mutt/1.5.6i

On Thu, Sep 09, 2004 at 11:59:54AM -0600, E. Joshua Rigler wrote:
> Now, I get the following error:
> `string' undeclared (first use this function)
> (Each undeclared identifier is reported only once for each
>      function it appears in.)
> syntax error before `::' token
> This is, in fact, the first time I've played with any C++ code in over
> three years, so for all I know, my questions may not even be specific to
> Octave. 

Yes, it is indeed the case that your question is not specific to Octave. It
is more about the change (probably) from gcc 2.95 (say) to gcc 3.x.
Qualifying string to be from the std namespace (std::string) should solve
most of your problems.

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();


Eric S Fraga, University College London,

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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