delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/02/17:31:17

From: dontmailme AT iname DOT com (Steamer)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: compare()
Date: Thu, 02 Nov 2000 22:17:14 GMT
Organization: always disorganized
Lines: 32
Message-ID: <3a01e7e5.47213960@news.freeserve.net>
References: <1F7509A3BB20243A DOT 7FD3AC2DC483DD04 DOT 6BB6DE9721314E90 AT lp DOT airnews DOT net> <39fea8f5 DOT 9349153 AT news DOT freeserve DOT net> <2D3CEFEF9F5772C9 DOT 21D15067E7ACE130 DOT 3275BE6B77FD834E AT lp DOT airnews DOT net> <39fecce1 DOT 18547083 AT news DOT freeserve DOT net> <E80A6618268722F2 DOT 334C4577FE04F5AA DOT 3D933E68350DF73B AT lp DOT airnews DOT net> <3a017252 DOT 17107696 AT news DOT freeserve DOT net> <7AB2F68195D27780 DOT 3FC067FFF65795BB DOT 71FA8F3C8AC71107 AT lp DOT airnews DOT net> <3a01add5 DOT 32346310 AT news DOT freeserve DOT net> <0C52CBEA9BF6346B DOT AD1B03126E6F4A63 DOT 7F91F834C1B967F2 AT lp DOT airnews DOT net>
NNTP-Posting-Host: modem-218.bursa-trigger.dialup.pol.co.uk
X-Trace: newsg4.svr.pol.co.uk 973203435 19214 62.136.244.218 (2 Nov 2000 22:17:15 GMT)
NNTP-Posting-Date: 2 Nov 2000 22:17:15 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

Rodeo Red wrote:

> yes I really don't need the functions right now, but I always wondered
> where they were. Thanks for clearing that up. 

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

> It appears I misunderstood the text of Lippman and Lajoie - I just want
> to emphasize that as far as I can tell it is a good reliable book. I've
> had my share of bad book so I appreciate it. 
> they used 
> replace( vec.begin(), vec.end(), oldval, newval);
>  whre old val and new val are strings, in a vector. I mistakenly used
> replace (str.begin(), str.end(), oldval, newval) ;
> 
> Which doesn't work because old val and new val are strings in a
> string.    
>  I'm still a little confused with the terminology- 
> A string is a container but each character is an element in itself -
> right ?

Things such as deques, lists, queues, stacks, vectors, sets, maps, etc.
are containers.  The standard doesn't seem to refer to basic_strings as
containers[*], but they are clearly containers of a sort.  The items held
in a container (or a basic_string) are called elements.  Of course, you
can have types like vector<list<string>> where the elements are themselves
containers.

[*] mainly, I think, because there are severe restrictions on what they
can contain

- Raw text -


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