From: Stan Moore Newsgroups: comp.os.msdos.djgpp Subject: Re: compare() Date: Tue, 31 Oct 2000 21:59:07 -0500 Message-ID: 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> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: digital-6-67.exis.net X-Trace: 31 Oct 2000 21:56:57 -0500, digital-6-67.exis.net Lines: 46 Organization: A Customer of Exis Net Inc To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Tue, 31 Oct 2000 13:45:17 GMT, dontmailme AT iname DOT com (Steamer) wrote: >Rodeo Red wrote: > >> > The compare() member functions for std::string in GCC's C++ library >> > are non-standard. >> very true :) > >> > The code that Stan Moore posted obviously won't work with most C++ >> > compilers. >> also very true, and I was remiss in not pointing that out. I was being hurried out the door on a very important mission; at least my teenage daughter thought it was terribly important :) In my haste I didn't explain things very well, I'm sorry. For that matter I'm not all that happy about the code either, but the question caught my interest because I haven't used GCC's library and spelunking through the info is always good exercise. >> >> 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 ? > >Correct. Looks like my lack of clarity didn't do any permanent damage to the collective :) I haven't had time to look at STLport. Does it work nicely with the djgpp installation?