www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/03/08:46:09

From: dontmailme AT iname DOT com (Steamer)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: compare()
Date: Fri, 03 Nov 2000 13:38:40 GMT
Organization: always disorganized
Lines: 24
Message-ID: <3a02bfd2.17527006@news.freeserve.net>
References: <8tubkf$4k2$2 AT antares DOT lu DOT erisoft DOT se>
NNTP-Posting-Host: modem-199.flame-angel.dialup.pol.co.uk
X-Trace: newsg3.svr.pol.co.uk 973258721 21687 62.137.13.199 (3 Nov 2000 13:38:41 GMT)
NNTP-Posting-Date: 3 Nov 2000 13:38:41 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Martin Stromberg wrote:

> : It turns out that the source is there anyway if you want to see it -
> : it's in the file c:\djgpp\lang\cxx\std\bastring.cc.  (I don't know why
> : that's there though, since I'm sure DJGPP just uses the library file.)
> 
> I don't know why, but it's there because bastring.h #includes
> std/bastring.cc.

You're right - I didn't notice that.

BTW, adding the following two lines

  int compare(size_type pos, size_type n, const basic_string& str) const
    { return compare (str, pos, n); }

to the basic_string class definition in bastring.h allows the program
in the original post in this thread to work (provided the program is
fixed by adding

#include <iostream>
#include <string>

at the start).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019