Mail Archives: djgpp/2000/10/31/07:00:29
Steamer wrote:
>
> Rodeo Red wrote:
>
> > On my djgpp compiler I get the error messages below, and I thought it
> > might be a compiler specific glitch. Does anyone know why this does not
> > compile ? It compares the last three letters of the word with a string.
>
> The compare() member functions for std::string in GCC's C++ library
> are non-standard.
What exactly does that mean ?
I'd guess you are saying that compare() is a standard C++ library
function, except GCC doesn't include all the standard variations, such
as :
int compare(size_type pos1, size_type n1, const basic_string& str)
const;
but includes other versions, which arent standard, such as:
int compare(const basic_string& str, size_type n1,)
> This should be fixed in GCC 3.0, which is due out
> by the end of the year. STLport (http://www.stlport.org) would also
> solve the problem - if you can get it to work with DJGPP.
>
> The code that Stan Moore posted obviously won't work with most C++
> compilers.
Well its not so obvious to me.:)
Let me see if I got this straight
He's using this form of compare:
if (( pos3 > 0 ) && (word.compare(ies, pos3)))
which would match:
int compare(const basic_string& str, size_type n1,)
Which does not match any compare() function in standard c++ but is
included with djgpp.
Correct ?
As you can tell I'm just learning how to understand the prototypes cited
in the error messages and the documentation, so I really would like to
know if I finally am getting it right.
Red
If this is right, maybe it means I finaly can follow those long, cryptic
error messages I get when there's no matching function.
- Raw text -