Thread: RE: [Dev-C++] Super charging the string class
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <iv...@em...> - 2003-07-04 17:25:46
|
-----Original Message----- From: Ioannis Vranos [mailto:iv...@em...]=20 Sent: Friday, July 04, 2003 8:20 PM To: 'Dev-Cpp Mailing List' Subject: RE: [Dev-C++] Super charging the string class =20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of David = McKen Sent: Friday, July 04, 2003 7:51 PM To: Dev-Cpp Mailing List Subject: [Dev-C++] Super charging the string class I am currently writing a heavy text-processing application. =20 As far as I can see the string class is not implemented uniformly. I = wish to fill in the gaps as well as add a few extras that are used on a regular basis in the program (not the least of which are overloading the =3D, << = and +=3D operators). =20 What would be the best way to do this? =20 I was thinking create a class that inhereted from the string class and = make my changes to that class. The only thing I am a bit curious about with = this method is what happens if I override a function that exist on one of the platforms. How can I check for it's existence at compile time (Odds are = the compiler writer's implementation is faster or more stable than mine).=20 =20 std::string is basically a typedef of basic_string<char>. That is , it = is: =20 typedef basic_string<char> string; =20 =20 You can inherit from both, but i assume you intent to inherit basic_string<char>. =20 =20 If you override an already existing function it will happen as always. = Your inherited class member function will be executed for your inherited = class instances (objects). As always however if you use a base pointer = (pointer to std::string) the string member function will be executed.=20 ... unless you make your type polymorphic (with virtual member = functions). =20 =20 Another way is to have an std::string object as a data member in your = new type but in this case you would have to provide the whole string = interface. =20 =20 To see the basic_string members you can check the stanndard, TC++PL 3, = or the web. =20 =20 =20 Another thing I saw and would like an opinion on is making all my = overloads global. (i.e. instead of being part of the class they are normal = functions thet implement the overloads). I see this getting a bit unweildly = though.=20 =20 =20 In any case you should place your new string type inside a namespace. = In this way you can even use the name string for your class! =20 As a general rule of style, definitions of operators having to do with objects of the same class are placed inside the class, and operators = having to do with objects of other types are placed as "global" (in the = namespace). =20 TC++PL tells about this somewhere (as it does for comment style using // = for comments and /* */ only for debugging). =20 I summary the master in TC++PL talks about everything! :-) =20 =20 =20 =20 =20 =20 Ioannis Vranos * Programming pages: <http://www.noicys.freeurl.com/> http://www.noicys.freeurl.com * Alternative URL 1: <http://run.to/noicys> http://run.to/noicys * Alternative URL 2: <http://www.noicys.cjb.net/> = http://www.noicys.cjb.net =20 |
|
From: David M. <ci...@ya...> - 2003-07-04 18:33:46
|
MessageI see. So sub-classing basic_string<char> would be the reccomended way to do this then?
With respect to the over-ridden methods I am wondering whether you have some example code that I can see. I know how to call base class methods from a derived class but what I need is a way to reverse the default method called (usually the derived method is called, I want the base to be called, if one exist)
----- Original Message -----
From: Ioannis Vranos
To: 'Dev-Cpp Mailing List'
Sent: Friday, July 04, 2003 1:19 PM
Subject: RE: [Dev-C++] Super charging the string class
-----Original Message-----
From: dev...@li... [mailto:dev...@li...] On Behalf Of David McKen
Sent: Friday, July 04, 2003 7:51 PM
To: Dev-Cpp Mailing List
Subject: [Dev-C++] Super charging the string class
I am currently writing a heavy text-processing application.
As far as I can see the string class is not implemented uniformly. I wish to fill in the gaps as well as add a few extras that are used on a regular basis in the program (not the least of which are overloading the =, << and += operators).
What would be the best way to do this?
I was thinking create a class that inhereted from the string class and make my changes to that class. The only thing I am a bit curious about with this method is what happens if I override a function that exist on one of the platforms. How can I check for it's existence at compile time (Odds are the compiler writer's implementation is faster or more stable than mine).
std::string is basically a typedef of basic_string<char>. That is , it is:
typedef basic_string<char> string;
You can inherit from both, but i assume you intent to inherit basic_string<char>.
If you override an already existing function it will happen as always. Your inherited class member function will be executed for your inherited class instances (objects). As always however if you use a base pointer (pointer to std::string) the string member function will be executed.
Another way is to have an std::string object as a data member in your new type but in this case you would have to provide the whole string interface.
To see the basic_string members you can check the stanndard, TC++PL 3, or the web.
Another thing I saw and would like an opinion on is making all my overloads global. (i.e. instead of being part of the class they are normal functions thet implement the overloads). I see this getting a bit unweildly though.
In any case you should place your new string type inside a namespace. In this way you can even use the name string for your class!
As a general rule of style, definitions of operators having to do with objects of the same class are placed inside the class, and operators having to do with objects of other types are placed as "global" (in the namespace).
TC++PL tells about this somewhere (as it does for comment style using // for comments and /* */ only for debugging).
I summary the master in TC++PL talks about everything! :-)
Ioannis Vranos
* Programming pages: http://www.noicys.freeurlcom
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net
---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. |
|
From: Ioannis V. <iv...@em...> - 2003-07-04 20:24:40
|
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of David =
McKen
Sent: Friday, July 04, 2003 9:34 PM
To: Dev-Cpp Mailing List
Subject: Re: [Dev-C++] Super charging the string class
I see. So sub-classing basic_string<char> would be the reccomended way =
to do
this then?
=20
With respect to the over-ridden methods I am wondering whether you have =
some
example code that I can see. I know how to call base class methods from =
a
derived class but what I need is a way to reverse the default method =
called
(usually the derived method is called, I want the base to be called, if =
one
exist)=20
=20
The concept is a bit stupid... You can check what members the =
std::string
has. anyway in general if you inherit from a class and you do not know =
what
member functions has(?!) if a member function exists, is non-virtual by =
its
creator and takes the same arguments as yours, you can use that function =
by
using a base pointer. For example:
=20
=20
class whatever
{
// ...
=20
public:
// ...
=20
int something() const;
};
=20
=20
class your_class: public whatever
{
// ...
=20
public:
//...
=20
// You happen to define something() and
// you did not know it existed(!?)
void something() const;
};
=20
=20
whatever *p=3Dnew your_class;
=20
=20
//whatever::something() is called
// and not your definition
p->something();
=20
=20
=20
Ioannis Vranos
* Programming pages: http://www.noicys.freeurl.com
<http://www.noicys.freeurl.com/>=20
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net =
<http://www.noicys.cjb.net/>
|
|
From: Graham D. <g.d...@nt...> - 2003-07-04 21:13:17
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
<br>
<br>
David McKen wrote:<br>
<blockquote type="cite"
cite="mid...@we...">
<title>Message</title>
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2800.1170" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">I see. So sub-classing
basic_string<char> would be the reccomended way to do this then?</font></div>
</blockquote>
No, no, no. basic_string is <span style="font-style: italic;">not</span>
designed for inheritance. It has no virtual functions and it has no
virtual destructor. Public inheritance from such a class is a major
maintenance nightmare waiting to happen. If you wish to extend the
functionality of basic_string, layer it - put in a class member of type
basic_string. You will have to re-specify all the functions from
basic_string that you want to use by stating them in your new class's
public interface and then passing them on to the basic_string member;
but even that amount of work is trivial compared to the potential
headaches that come from publically inheriting from a class that isn't
designed for it. And it's not just me saying it, Scott Meyers in <span
style="font-style: italic;">Effective C++</span> devotes an entire
item to warning of the dangers, Herb Sutter has written a number of
articles detailing why you shouldn't do; I think I saw something from
Stroustrup about it as well. All the experts agree: don't do it!<br>
<blockquote type="cite"
cite="mid...@we...">
<div> </div>
<div><font face="Arial" size="2">With respect to the over-ridden
methods I am wondering whether you have some example code that I can
see. I know how to call base class methods from a derived class but
what I need is a way to reverse the default method called (usually the
derived method is called, I want the base to be called, if one exist)</font></div>
<blockquote dir="ltr"
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">-----
Original Message ----- </div>
<div
style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b>
<a title="iv...@em..." href="mailto:iv...@em...">Ioannis Vranos</a>
</div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b>
<a title="dev...@li..."
href="mailto:dev...@li...">'Dev-Cpp Mailing
List'</a> </div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b>
Friday, July 04, 2003 1:19 PM</div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b>
RE: [Dev-C++] Super charging the string class</div>
<div><br>
</div>
<div><strong></strong> </div>
<blockquote
style="border-left: 2px solid rgb(0, 0, 128); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div class="OutlookMessageHeader" lang="en-us" dir="ltr"
align="left"><font face="Tahoma" size="2">-----Original Message-----<br>
<b>From:</b> <a
href="mailto:dev...@li...">dev...@li...</a>
[<a class="moz-txt-link-freetext" href="mailto:dev...@li...">mailto:dev...@li...</a>] <b>On Behalf Of </b>David
McKen<br>
<b>Sent:</b> Friday, July 04, 2003 7:51 PM<br>
<b>To:</b> Dev-Cpp Mailing List<br>
<b>Subject:</b> [Dev-C++] Super charging the string class<br>
<br>
</font></div>
<div><font face="Arial" size="2">I am currently writing a heavy
text-processing application.</font></div>
<div> </div>
<div><font face="Arial" size="2">As far as I can see the string
class is not implemented uniformly. I wish to fill in the gaps as well
as add a few extras that are used on a regular basis in the program
(not the least of which are overloading the =, << and +=
operators).</font></div>
<div> </div>
<div><font face="Arial" size="2">What would be the best way to do
this?</font></div>
<div> </div>
<div><font face="Arial"><font size="2">I was thinking create a
class that inhereted from the string class and make my changes to that
class. The only thing I am a bit curious about with this method is what
happens if I override a function that exist on one of the platforms.
How can I check for it's existence at compile time (Odds are the
compiler writer's implementation is faster or more stable than mine).<span
class="706580917-04072003"><strong><font color="#000080"> </font></strong></span></font></font></div>
</blockquote>
<div><strong></strong> </div>
<div><strong><font face="Arial"><font size="2"><font color="#000080"><font
face="Arial"><font size="2"><span class="706580917-04072003">std::string
is basically a typedef of basic_string<char>. That is , it is:</span></font></font></font></font></font></strong></div>
<div><strong></strong> </div>
<div><strong><font face="Arial"><font size="2"><font color="#000080"><font
face="Arial"><font size="2"><span class="706580917-04072003">typedef
basic_string<char> string;</span></font></font></font></font></font></strong></div>
<div><strong></strong> </div>
<div><strong></strong> </div>
<div><strong><font face="Arial"><font size="2"><font color="#000080"><font
face="Arial"><font size="2"><span class="706580917-04072003">You can
inherit from both, but i assume you intent to inherit
basic_string<char>.</span></font></font></font></font></font></strong></div>
<div><strong></strong> </div>
<div><strong></strong> </div>
<div><strong><font face="Arial"><font size="2"><font color="#000080"><font
face="Arial"><font size="2"><span class="706580917-04072003">If you
override an already existing function it will happen as always. Your
inherited class member function will be executed for your inherited
class instances (objects). As always however if you use a base pointer
(pointer to std::string) the string member function will be executed.</span></font></font></font></font></font></strong></div>
<div><strong></strong> </div>
<div><strong></strong> </div>
<div><strong><font face="Arial"><font size="2"><font color="#000080"><font
face="Arial"><font size="2"><span class="706580917-04072003">Another
way is to have an std::string object as a data member in your new type
but in this case you would have to provide the whole string interface.</span></font></font></font></font></font></strong></div>
<div><strong></strong> </div>
<div><strong></strong> </div>
<div><strong><font face="Arial"><font size="2"><font color="#000080"><font
face="Arial"><font size="2"><span class="706580917-04072003">To
see the basic_string members you can check the stanndard, TC++PL 3, or
the web.</span></font></font></font></font></font></strong></div>
<div><strong></strong> </div>
<div><strong></strong> </div>
<div><strong></strong> </div>
<blockquote
style="border-left: 2px solid rgb(0, 0, 128); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div><font face="Arial"><font size="2">Another thing I saw and
would like an opinion on is making all my overloads global. (i.e.
instead of being part of the class they are normal functions thet
implement the overloads). I see this getting a bit unweildly though.<span
class="706580917-04072003"><strong><font color="#000080"> </font></strong></span></font></font></div>
</blockquote>
<div><font size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong></strong></span></font></font> </div>
<div> </div>
<div><font size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"> <strong>In any case you should place your
new string type inside a namespace. In this way you can even use the
name string for your class!</strong></span></font></font></div>
<div><font size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong></strong></span></font></font> </div>
<div><font size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong>As a general rule of style,
definitions of operators having to do with objects of the same class
are placed inside the class, and operators having to do with objects of
other types are placed as "global" (in the namespace).</strong></span></font></font></div>
<div><font size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong></strong></span></font></font> </div>
<div><font size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong>TC++PL tells about this somewhere
(as it does for comment style using // for comments and /* */ only for
debugging).</strong></span></font></font></div>
<div><font size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong></strong></span></font></font> </div>
<div><font size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong>I summary the master in TC++PL
talks about everything! :-)</strong></span></font></font></div>
<div><font size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong></strong></span></font></font> </div>
<div><strong><font face="Arial"><font size="2"><font color="#000080"><font
size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong></strong></span></font></font></font></font></font></strong> </div>
<div><strong><font face="Arial"><font size="2"><font color="#000080"><font
size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong></strong></span></font></font></font></font></font></strong> </div>
<div><strong><font face="Arial"><font size="2"><font color="#000080"><font
size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong></strong></span></font></font></font></font></font></strong> </div>
<div><strong><font face="Arial"><font size="2"><font color="#000080"><font
size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong></strong></span></font></font></font></font></font></strong> </div>
<div><strong><font face="Arial"><font size="2"><font color="#000080"><font
size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><strong></strong></span></font></font></font></font></font></strong> </div>
<div><font size="+0"><font face="Arial" color="#000080" size="2"><span
class="706580917-04072003"><font size="2"><strong>Ioannis Vranos<br>
<br>
* Programming pages: </strong><a href="http://www.noicys.freeurl.com/"><strong>http://www.noicys.freeurlcom</strong></a><br>
<strong>* Alternative URL 1: </strong><a
href="http://run.to/noicys"><strong>http://run.to/noicys</strong></a><br>
<strong>* Alternative URL 2: </strong><a
href="http://www.noicys.cjb.net/"><strong>http://www.noicys.cjb.net</strong></a></font>
</span></font></font></div>
<font size="+0"><font face="Arial" color="#000080" size="2"> </font></font>
<div> </div>
</blockquote>
<hr size="1">Do you Yahoo!?<br>
<a
href="http://us.rd.yahoo.com/search/mailsig/*http://search.yahoo.com">The
New Yahoo! Search</a> - Faster. Easier. Bingo.
</blockquote>
</body>
</html>
|
|
From: Ioannis V. <iv...@em...> - 2003-07-04 20:29:30
|
Also keep in mind that the standard library is very wide and i would say complete for what it provides. Are you sure you have found things that = do not exist in the standard library? =20 =20 =20 =20 =20 =20 Ioannis Vranos * Programming pages: <http://www.noicys.freeurl.com/> http://www.noicys.freeurl.com * Alternative URL 1: <http://run.to/noicys> http://run.to/noicys * Alternative URL 2: <http://www.noicys.cjb.net/> = http://www.noicys.cjb.net =20 |
|
From: David M. <ci...@ya...> - 2003-07-05 02:25:17
|
Thanks for the Warning! :)
----- Original Message -----
From: Graham Douglas
To: Dev-C++ users
Sent: Friday, July 04, 2003 5:13 PM
Subject: Re: [Dev-C++] Super charging the string class
David McKen wrote:
I see. So sub-classing basic_string<char> would be the reccomended way to do this then?
No, no, no. basic_string is not designed for inheritance. It has no virtual functions and it has no virtual destructor. Public inheritance from such a class is a major maintenance nightmare waiting to happen. If you wish to extend the functionality of basic_string, layer it - put in a class member of type basic_string. You will have to re-specify all the functions from basic_string that you want to use by stating them in your new class's public interface and then passing them on to the basic_string member; but even that amount of work is trivial compared to the potential headaches that come from publically inheriting from a class that isn't designed for it. And it's not just me saying it, Scott Meyers in Effective C++ devotes an entire item to warning of the dangers, Herb Sutter has written a number of articles detailing why you shouldn't do; I think I saw something from Stroustrup about it as well. All the experts agree: don't do it!
With respect to the over-ridden methods I am wondering whether you have some example code that I can see. I know how to call base class methods from a derived class but what I need is a way to reverse the default method called (usually the derived method is called, I want the base to be called, if one exist)
----- Original Message -----
From: Ioannis Vranos
To: 'Dev-Cpp Mailing List'
Sent: Friday, July 04, 2003 1:19 PM
Subject: RE: [Dev-C++] Super charging the string class
-----Original Message-----
From: dev...@li... [mailto:dev...@li...] On Behalf Of David McKen
Sent: Friday, July 04, 2003 7:51 PM
To: Dev-Cpp Mailing List
Subject: [Dev-C++] Super charging the string class
I am currently writing a heavy text-processing application.
As far as I can see the string class is not implemented uniformly. I wish to fill in the gaps as well as add a few extras that are used on a regular basis in the program (not the least of which are overloading the =, << and += operators).
What would be the best way to do this?
I was thinking create a class that inhereted from the string class and make my changes to that class. The only thing I am a bit curious about with this method is what happens if I override a function that exist on one of the platforms. How can I check for it's existence at compile time (Odds are the compiler writer's implementation is faster or more stable than mine).
std::string is basically a typedef of basic_string<char>. That is , it is:
typedef basic_string<char> string;
You can inherit from both, but i assume you intent to inherit basic_string<char>.
If you override an already existing function it will happen as always. Your inherited class member function will be executed for your inherited class instances (objects). As always however if you use a base pointer (pointer to std::string) the string member function will be executed.
Another way is to have an std::string object as a data member in your new type but in this case you would have to provide the whole string interface.
To see the basic_string members you can check the stanndard, TC++PL 3, or the web.
Another thing I saw and would like an opinion on is making all my overloads global. (i.e. instead of being part of the class they are normal functions thet implement the overloads). I see this getting a bit unweildly though.
In any case you should place your new string type inside a namespace. In this way you can even use the name string for your class!
As a general rule of style, definitions of operators having to do with objects of the same class are placed inside the class, and operators having to do with objects of other types are placed as "global" (in the namespace).
TC++PL tells about this somewhere (as it does for comment style using // for comments and /* */ only for debugging).
I summary the master in TC++PL talks about everything! :-)
Ioannis Vranos
* Programming pages: http://www.noicys.freeurlcom
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net
---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month! |
|
From: David M. <ci...@ya...> - 2003-07-05 22:22:47
|
MessageOk what is a good refrence for the STL then?
I have been using SGI web site and there is no warning (that I saw) saying that the hash_* containers and functions are not part of the STL standard (or the ANSI C++ standard). I did see the warning about bitvectors being taken out but nothing about hash_*
----- Original Message -----
From: Ioannis Vranos
To: 'Dev-Cpp Mailing List'
Sent: Saturday, July 05, 2003 3:52 PM
Subject: RE: [Dev-C++] Super charging the string class
-----Original Message-----
From: dev...@li... [mailto:dev...@li...] On Behalf Of David McKen
Sent: Saturday, July 05, 2003 6:50 PM
To: Dev-Cpp Mailing List
Subject: Fw: [Dev-C++] Super charging the string class
Unfortunately I am using the Visual C++ implementation of the Standard C++ library (Visual C++ 6.0 Service pack 5).
It is sure that it will change at some time.
My chief concern is the fact that the entire hash_* functions
The standard library has not any hash function. However the upcoming C++0x standard will have.
and containers are missing (this may seem small but as I said earlier my program is quite heavy on text processing, so hashing is quite important to me.)
Yes. And VC++ 6 is too old (eons in computer age). Oh well, anyway. :-)
Ioannis Vranos
* Programming pages: http://www.noicys.freeurl.com
* Alternative URL 1: http://run.to/noicys
* Alternative URL 2: http://www.noicys.cjb.net
---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month! |
|
From: Graham D. <g.d...@nt...> - 2003-07-05 22:46:06
|
The definitive source of course is the ISO C++ standard. You can get a PDF copy of this for $18 from the ANSI store at www.ansi.org (follow the "Standards Store" link). The books by Nicolia Josuttis and by Matthew Austern both provide good reference material (sorry, I can't remember the titles offhand, but a search on amazon should produce fairly obvious results). David McKen wrote: > Ok what is a good refrence for the STL then? > > I have been using SGI web site and there is no warning (that I saw) > saying that the hash_* containers and functions are not part of the > STL standard (or the ANSI C++ standard). I did see the warning about > bitvectors being taken out but nothing about hash_* > > ----- Original Message ----- > *From:* Ioannis Vranos <mailto:iv...@em...> > *To:* 'Dev-Cpp Mailing List' > <mailto:dev...@li...> > *Sent:* Saturday, July 05, 2003 3:52 PM > *Subject:* RE: [Dev-C++] Super charging the string class > > -----Original Message----- > *From:* dev...@li... > <mailto:dev...@li...> > [mailto:dev...@li...] *On Behalf Of > *David McKen > *Sent:* Saturday, July 05, 2003 6:50 PM > *To:* Dev-Cpp Mailing List > *Subject:* Fw: [Dev-C++] Super charging the string class > > Unfortunately I am using the Visual C++ implementation of the > Standard C++ library (Visual C++ 6.0 Service pack 5).* * > > ** > *It is sure that it will change at some time.* > ** > > My chief concern is the fact that the entire hash_* functions* * > > ** > *The standard library has not any hash function. However the > upcoming C++0x standard will have.* > ** > > and containers are missing (this may seem small but as I > said earlier my program is quite heavy on text processing, so > hashing is quite important to me.)* * > > ** > ** > *Yes. And VC++ 6 is too old (eons in computer age). Oh well, > anyway. :-)* > ** > ** > * > > > > > > Ioannis Vranos > > * Programming pages: http://www.noicys.freeurl.com > <http://www.noicys.freeurl.com/> > * Alternative URL 1: http://run.to/noicys > * Alternative URL 2: http://www.noicys.cjb.net > <http://www.noicys.cjb.net/> > > * > > ------------------------------------------------------------------------ > Do you Yahoo!? > SBC Yahoo! DSL > <http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/sbc/> > - Now only $29.95 per month! |
|
From: Ioannis V. <iv...@em...> - 2003-07-06 07:30:40
|
Excellent references are: =20 1) The C++ standard itself which is sold at the ANSI or ISO web sites. =20 http://www.rgai.hu/~beszedes/munka/ =20 =20 2) "The C++ Programming Language" 3rd Edition or Special Edition by = Bjarne Stroustrup (the creator of C++), which is best to read it cover to cover than just having it only for reference. =20 =20 =20 =20 =20 =20 Ioannis Vranos * Programming pages: <http://www.noicys.freeurl.com/> http://www.noicys.freeurl.com * Alternative URL 1: <http://run.to/noicys> http://run.to/noicys * Alternative URL 2: <http://www.noicys.cjb.net/> = http://www.noicys.cjb.net =20 -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of David = McKen Sent: Sunday, July 06, 2003 1:23 AM To: Dev-Cpp Mailing List Subject: Re: [Dev-C++] Super charging the string class Ok what is a good refrence for the STL then? =20 I have been using SGI web site and there is no warning (that I saw) = saying that the hash_* containers and functions are not part of the STL = standard (or the ANSI C++ standard). I did see the warning about bitvectors being taken out but nothing about hash_* ----- Original Message -----=20 From: Ioannis Vranos <mailto:iv...@em...> =20 To: 'Dev-Cpp Mailing List' <mailto:dev...@li...> = Sent: Saturday, July 05, 2003 3:52 PM Subject: RE: [Dev-C++] Super charging the string class -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of David = McKen Sent: Saturday, July 05, 2003 6:50 PM To: Dev-Cpp Mailing List Subject: Fw: [Dev-C++] Super charging the string class Unfortunately I am using the Visual C++ implementation of the Standard = C++ library (Visual C++ 6.0 Service pack 5).=20 =20 It is sure that it will change at some time. =20 My chief concern is the fact that the entire hash_* functions=20 =20 The standard library has not any hash function. However the upcoming = C++0x standard will have. =20 and containers are missing (this may seem small but as I said earlier = my program is quite heavy on text processing, so hashing is quite important = to me.)=20 =20 =20 Yes. And VC++ 6 is too old (eons in computer age). Oh well, anyway. :-) =20 =20 =20 =20 Ioannis Vranos * Programming pages: <http://www.noicys.freeurl.com/> http://www.noicys.freeurl.com * Alternative URL 1: <http://run.to/noicys> http://run.to/noicys * Alternative URL 2: <http://www.noicys.cjb.net/> = http://www.noicys.cjb.net _____ =20 Do you Yahoo!? SBC <http://pa.yahoo.com/*http://rd.yahoo.com/evt=3D1207/*http://promo.yahoo.= com/s bc/> Yahoo! DSL - Now only $29.95 per month! |
|
From: David M. <ci...@ya...> - 2003-07-05 23:03:07
|
Quote from the C++ black book "NOTE: The ANSI/ISO C++ standard itself is really targeted for those who want to create C++ compilers, and you might find it hard to wade through." End quote ----- Original Message ----- From: Graham Douglas Cc: Dev-Cpp Mailing List Sent: Saturday, July 05, 2003 6:46 PM Subject: Re: [Dev-C++] Super charging the string class The definitive source of course is the ISO C++ standard. You can get a PDF copy of this for $18 from the ANSI store at www.ansi.org (follow the "Standards Store" link). The books by Nicolia Josuttis and by Matthew Austern both provide good reference material (sorry, I can't remember the titles offhand, but a search on amazon should produce fairly obvious results). David McKen wrote: Ok what is a good refrence for the STL then? I have been using SGI web site and there is no warning (that I saw) saying that the hash_* containers and functions are not part of the STL standard (or the ANSI C++ standard). I did see the warning about bitvectors being taken out but nothing about hash_* ----- Original Message ----- From: Ioannis Vranos To: 'Dev-Cpp Mailing List' Sent: Saturday, July 05, 2003 3:52 PM Subject: RE: [Dev-C++] Super charging the string class -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of David McKen Sent: Saturday, July 05, 2003 6:50 PM To: Dev-Cpp Mailing List Subject: Fw: [Dev-C++] Super charging the string class Unfortunately I am using the Visual C++ implementation of the Standard C++ library (Visual C++ 6.0 Service pack 5). It is sure that it will change at some time. My chief concern is the fact that the entire hash_* functions The standard library has not any hash function. However the upcoming C++0x standard will have. and containers are missing (this may seem small but as I said earlier my program is quite heavy on text processing, so hashing is quite important to me.) Yes. And VC++ 6 is too old (eons in computer age). Oh well, anyway. :-) Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net --------------------------------- Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! --------------------------------- Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! |
|
From: Graham D. <g.d...@nt...> - 2003-07-06 09:28:53
|
The standard itself can be hard to wade through, since it's written formally, with the intent of being unambiguous (it doesn't always succeed!). I disagree that it's targetted at compiler writers: certainly it's of utmost importance to them, but to say that that's it's purpose.... no - the standard is there as an arbiter, since it is, by definition, always correct. And it behooves anyone who calls themself a professional to be familiar with the rules and regulations of the language they use. I use it mostly as a reference in cases of confusion or dispute - my first port of call is usually Meyers or Sutter or Stroustrup. For looking up what is and isn't in the standard library, the Standard is perfect, since you only have to check the section headings. David McKen wrote: > Quote from the C++ black book > > "NOTE: The ANSI/ISO C++ standard itself is really targeted for those > who want to create C++ compilers, and you might find it hard to wade > through." > > End quote > > ----- Original Message ----- > *From:* Graham Douglas <mailto:g.d...@nt...> > *Cc:* Dev-Cpp Mailing List > <mailto:dev...@li...> > *Sent:* Saturday, July 05, 2003 6:46 PM > *Subject:* Re: [Dev-C++] Super charging the string class > > The definitive source of course is the ISO C++ standard. You can > get a PDF copy of this for $18 from the ANSI store at > www.ansi.org <http://www.ansi.org> (follow the "Standards Store" > link). > > The books by Nicolia Josuttis and by Matthew Austern both provide > good reference material (sorry, I can't remember the titles > offhand, but a search on amazon should produce fairly obvious > results). > > David McKen wrote: > >> Ok what is a good refrence for the STL then? >> >> I have been using SGI web site and there is no warning (that I >> saw) saying that the hash_* containers and functions are not part >> of the STL standard (or the ANSI C++ standard). I did see the >> warning about bitvectors being taken out but nothing about hash_* >> >> ----- Original Message ----- >> *From:* Ioannis Vranos <mailto:iv...@em...> >> *To:* 'Dev-Cpp Mailing List' >> <mailto:dev...@li...> >> *Sent:* Saturday, July 05, 2003 3:52 PM >> *Subject:* RE: [Dev-C++] Super charging the string class >> >> -----Original Message----- >> *From:* dev...@li... >> <mailto:dev...@li...> >> [mailto:dev...@li...] *On Behalf >> Of *David McKen >> *Sent:* Saturday, July 05, 2003 6:50 PM >> *To:* Dev-Cpp Mailing List >> *Subject:* Fw: [Dev-C++] Super charging the string class >> >> Unfortunately I am using the Visual C++ implementation of >> the Standard C++ library (Visual C++ 6.0 Service pack 5).* * >> >> ** >> *It is sure that it will change at some time.* >> ** >> >> My chief concern is the fact that the entire hash_* >> functions* * >> >> ** >> *The standard library has not any hash function. However the >> upcoming C++0x standard will have.* >> ** >> >> and containers are missing (this may seem small but as >> I said earlier my program is quite heavy on text >> processing, so hashing is quite important to me.)* * >> >> ** >> ** >> *Yes. And VC++ 6 is too old (eons in computer age). Oh well, >> anyway. :-)* >> ** >> ** >> * >> >> >> >> >> >> Ioannis Vranos >> >> * Programming pages: http://www.noicys.freeurl.com >> <http://www.noicys.freeurl.com/> >> * Alternative URL 1: http://run.to/noicys >> * Alternative URL 2: http://www.noicys.cjb.net >> <http://www.noicys.cjb.net/> >> >> * >> >> ------------------------------------------------------------------------ >> Do you Yahoo!? >> SBC Yahoo! DSL >> <http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo..yahoo.com/sbc/> >> - Now only $29.95 per month! > > ------------------------------------------------------------------------ > Do you Yahoo!? > SBC Yahoo! DSL > <http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/sbc/> > - Now only $29.95 per month! |
|
From: Michal M. <mol...@se...> - 2003-07-07 18:26:41
|
Abhijit Shylanath wrote: > Hello, Michal. > > >>2 admin: why isn't this mailing list setting correctly Reply-To header? >>Can you, please, do something with it? > > > I think the ML is set up like that, so that you reply off-line by default. > What most of us do when we want to post on the list is `Reply All', which > also drops a direct copy into the recepients' mailboxes (I remember once > when the list server was acting up, so this may be a wise precaution). but i don't understand logic of that: most of the people who asks are subscribed so they will got the reply twice i'm subsribed to many mailing lists but only this one is doing this so every time i reply in this list i'm surprised what happened :-) sadly my e-mail program hasn't Reply-to-list feature as has KMail |
|
From: Ioannis V. <iv...@em...> - 2003-07-07 18:55:21
|
The funny part is that at the ancient times I joined Internet (1996) = there were no ready mailing list servers. So you wither had a mailing server whicch would automatically forward everything to the recipients (which = would be mainly a UNIX system then) or you Cced everything manually yourself = to the other recipients. The functionality of this mailing list is = something like a partly hybrid of nowadays and of that time. Now lets make a Dev-C++ BBS. Is anyone in? :-) Ioannis Vranos =20 * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net > -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of Michal Molhanec > Sent: Monday, July 07, 2003 9:27 PM > To: dev...@li... > Subject: Re: [Dev-C++] Super charging the string class >=20 >=20 > Abhijit Shylanath wrote: > > Hello, Michal. > >=20 > >=20 > >>2 admin: why isn't this mailing list setting correctly=20 > Reply-To header? > >>Can you, please, do something with it? > >=20 > >=20 > > I think the ML is set up like that, so that you reply=20 > off-line by default. > > What most of us do when we want to post on the list is=20 > `Reply All', which > > also drops a direct copy into the recepients' mailboxes (I=20 > remember once > > when the list server was acting up, so this may be a wise=20 > precaution). >=20 > but i don't understand logic of that: most of the people who asks are=20 > subscribed so they will got the reply twice >=20 > i'm subsribed to many mailing lists but only this one is=20 > doing this so=20 > every time i reply in this list i'm surprised what happened :-) >=20 > sadly my e-mail program hasn't Reply-to-list feature as has KMail >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_06 1203_01/01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |