help-octave
[Top][All Lists]
Advanced

[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:
> 
> 
>   test.cc:489: `string' undeclared (first use this function)
>   test.cc:489: (Each undeclared identifier is reported only once for each
>      function it appears in.)
>   test.cc:489: 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();

HTH,
eric

-- 
 ........oo...ooo..o..o.o...o.o....oooo..oo...o.....o.....ooo..o..............
Eric S Fraga, University College London, www.ucl.ac.uk/chemeng/staff/fraga.html



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