www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/05/13:00:12

From: dontmailme AT iname DOT com (Steamer)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: compare()
Date: Sat, 04 Nov 2000 11:49:03 GMT
Organization: always disorganized
Lines: 67
Message-ID: <3a03f79c.11920035@news.freeserve.net>
References: <8tubkf$4k2$2 AT antares DOT lu DOT erisoft DOT se> <3a02bfd2 DOT 17527006 AT news DOT freeserve DOT net> <8tvl6p$5$1 AT slb7 DOT atl DOT mindspring DOT net>
NNTP-Posting-Host: modem-164.missouri.dialup.pol.co.uk
X-Trace: newsg3.svr.pol.co.uk 973338545 18751 62.137.76.164 (4 Nov 2000 11:49:05 GMT)
NNTP-Posting-Date: 4 Nov 2000 11:49:05 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

Charlie Hall wrote:

> I've been following this thread because some questions have been asked and
> answered that were educational for me.  I am fairly new to all this C++, and
> am confused by some of the terminology in the bastring.cc and bastring.h
> files.  I would appreciate your pointing me to any helpful information if it
> exists.  If you can recommend a good reference text, I'd also appreciate
> that.

The definitive reference for C++ is the standard itself (ISO/IEC 14882:1998),
which you can get in PDF format from http://www.ansi.org for $18.
If you don't want to pay that, then you can get a draft of the standard
for free from ftp://ftp.maths.warwick.ac.uk/pub/c++/std/cd2/ or
ftp://ftp.research.att.com/dist/c++std/WP/CD2/ .  (There are differences
between the draft and the standard, but apparently they are mostly minor.)

> I have Stroustrup, but I find him very hard to follow.  I also bought
> the "Learn C++ in 21 Days" book, and it leaves a lot to the imagination.

You may want to take a look at the book reviews at
http://www.accu.org/bookreviews/public/reviews/0sb/index.htm .
But avoid any book which was written before the standard was published.

> A basic question is this:  I am writing a program that will manipulate text
> sequences.  I'll need to read them from a file, break the text into words
> and then do processes on the words.

You probably have a good reason for doing this in C++, but if not then
consider using Perl instead, as this sounds like the sort of thing that
Perl is good for.

> It would be "nice" if I could go to a
> list of string functions that are available to me (using DJGPP) from which I
> could pick and choose the ones I need.  I'm now assuming that the "list" is
> in the bastring files, and it's up to me to study each of the definitions
> and select the ones I can use.

Don't use bastring.h as your reference.  Except for the compare() functions
that were highlighted in this thread, DJGPP seems to support just about all
the standard string functions.  And any non-standard functions you find in
bastring.h may cease to be supported in later versions, so it's best to
stick to the standard ones anyway.

The Dinkumware library reference that I pointed out to you before has a
more readable list of standard string functions:

http://www.dinkumware.com/htm_cpl/string2.html

See also the string section of SGI's STL reference:

http://www.sgi.com/Technology/STL/basic_string.html

> I find that understanding the terminology in
> the definitions is difficult for me, and that I believe I really could use
> an example every now and then (I guess that's why I got some good from this
> thread).  I don't mind doing the work, it's just that right now I don't know
> where to go for the information.

I recommend looking at the newsgroup comp.lang.c++.  There's so much
posted there that you probably won't want to read it all, but if you just
read selected threads you should learn something, and get to see some
examples (not always good examples, of course, but you soon get to know
which posters know what they are talking about).

And there's lots of good info in the C++ FAQ Lite.  You can browse it
on-line at http://www.parashift.com/c++-faq-lite/ or send a blank e-mail
to cline-cpp-faq-html-zip AT crynwr DOT com to have it e-mailed to you.

- Raw text -


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