Mail Archives: djgpp/2000/11/03/19:45:17
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. 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.
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. 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. 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.
Thanks, Charlie
Steamer <dontmailme AT iname DOT com> wrote in message
news:3a02bfd2 DOT 17527006 AT news DOT freeserve DOT net...
> 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 -