Thread: Fw: [Dev-C++] Super charging the string class
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: David M. <ci...@ya...> - 2003-07-05 15:50:09
|
MessageUnfortunately I am using the Visual C++ implementation of the Standard C++ library (Visual C++ 6.0 Service pack 5). My chief concern is the fact that the entire hash_* functions 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.) Much of the rest of the library seems to be intact and working. Much of my additions will allow me to use various data types with strings (This is how parts of my program are now) temp += "My dice roll = "; temp += itoa(comp_roll); temp += eoln; temp += "Your dice roll = "; temp += itoa(player_roll); temp += eoln; (this version of itoa is my implementation, eoln = const char = "\n\r", player roll and comp roll are ints containing a random number between 1 and 6 inclusive) As you can guess this can get quite annoying. being able to turn each block into 1 line would be quite advantageous. ----- Original Message ----- From: Ioannis Vranos To: 'Dev-Cpp Mailing List' Sent: Friday, July 04, 2003 4:29 PM Subject: RE: [Dev-C++] Super charging the string class 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? 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!? The New Yahoo! Search - Faster. Easier. Bingo. |
|
From: Graham D. <g.d...@nt...> - 2003-07-05 16:18:38
|
David McKen wrote: > Unfortunately I am using the Visual C++ implementation of the Standard > C++ library (Visual C++ 6.0 Service pack 5). > > My chief concern is the fact that the entire hash_* functions 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.) They're not missing as such. hash_map and hash_multimap are not part of the C++ standard, so no compiler is required to support them. You need to be aware of this whenever you choose to use them. Also, because they are not standard, there may not be consistency of interface either. > > Much of the rest of the library seems to be intact and working. Much > of my additions will allow me to use various data types with strings > (This is how parts of my program are now) > > temp += "My dice roll = "; > temp += itoa(comp_roll); > temp += eoln; > > temp += "Your dice roll = "; > temp += itoa(player_roll); > temp += eoln; > > (this version of itoa is my implementation, eoln = const char = > "\n\r", player roll and comp roll are ints containing a random number > between 1 and 6 inclusive) > > As you can guess this can get quite annoying. being able to turn each > block into 1 line would be quite advantageous. Maybe I've missed something, but why can't you use stringstream? e.g. std::ostringstream oss; oss << "My dice roll = " << itoa(comp_roll) << eoln; oss << "Your dice roll = " << itoa(player_roll) << eoln; std::string s(oss.str()); // work with s.... > > ----- Original Message ----- > > *From:* Ioannis Vranos <mailto:iv...@em...> > *To:* 'Dev-Cpp Mailing List' > <mailto:dev...@li...> > *Sent:* Friday, July 04, 2003 4:29 PM > *Subject:* RE: [Dev-C++] Super charging the string class > > *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?* > **** > **** > ** > ** > **** > **** > *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!? > The New Yahoo! Search > <http://us.rd.yahoo.com/search/mailsig/*http://search.yahoo.com> - > Faster. Easier. Bingo. |
|
From: Michal M. <mi...@mo...> - 2003-07-05 16:20:52
|
what about using stringstream? David McKen wrote: > Unfortunately I am using the Visual C++ implementation of the Standard > C++ library (Visual C++ 6.0 Service pack 5). > > My chief concern is the fact that the entire hash_* functions 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.) > > Much of the rest of the library seems to be intact and working. Much of > my additions will allow me to use various data types with strings (This > is how parts of my program are now) > > temp += "My dice roll = "; > temp += itoa(comp_roll); > temp += eoln; > > temp += "Your dice roll = "; > temp += itoa(player_roll); > temp += eoln; > > (this version of itoa is my implementation, eoln = const char = "\n\r", > player roll and comp roll are ints containing a random number between 1 > and 6 inclusive) > > As you can guess this can get quite annoying. being able to turn each > block into 1 line would be quite advantageous. |
|
From: David M. <ci...@ya...> - 2003-07-05 17:14:24
|
Ok, That works ( quite well :) ) I have a different question now. Where can I find a Standard C++ API refrence? I am currently using Standard C: http://www-ccs.ucsd.edu/c/ And STL refrence: http://www.sgi.com/tech/stl/table_of_contents.html Neither have strstream listed. --- Michal Molhanec <mi...@mo...> wrote: > > what about using stringstream? > > David McKen wrote: > > > Unfortunately I am using the Visual C++ implementation > of the Standard > > C++ library (Visual C++ 6.0 Service pack 5). > > > > My chief concern is the fact that the entire hash_* > functions 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.) > > > > Much of the rest of the library seems to be intact and > working. Much of > > my additions will allow me to use various data types > with strings (This > > is how parts of my program are now) > > > > temp += "My dice roll = "; > > temp += itoa(comp_roll); > > temp += eoln; > > > > temp += "Your dice roll = "; > > temp += itoa(player_roll); > > temp += eoln; > > > > (this version of itoa is my implementation, eoln = > const char = "\n\r", > > player roll and comp roll are ints containing a random > number between 1 > > and 6 inclusive) > > > > As you can guess this can get quite annoying. being > able to turn each > > block into 1 line would be quite advantageous. > > > > > ------------------------------------------------------- > 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://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users ===== Signed David Mcken Life Sucks Live with it __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com |
|
From: Michal M. <mol...@se...> - 2003-07-05 17:53:07
|
David McKen wrote: > Ok, That works ( quite well :) ) > > I have a different question now. Where can I find a > Standard C++ API refrence? I am currently using I'm using book :-) But you can look at these places: MSDN http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html http://www.dinkumware.com/manuals/reader.aspx?lib=cpp http://www.roguewave.com/support/docs/sourcepro/stdlibref/index.html > Neither have strstream listed. Warning: strstream is deprecated! you should use stringstream (header file <sstream>)! |
|
From: Ioannis V. <iv...@em...> - 2003-07-05 19:52:54
|
-----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 |
|
From: Per W. <pw...@ia...> - 2003-07-05 20:02:29
|
Feature-wise, VC6 was old when it was released. And several bugs I had reported 6-12 month before the initial release wan't fixed until after one or more service packs. /Per W On Sat, 5 Jul 2003, Ioannis Vranos wrote: > -----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/> > 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 > > > |
|
From: Ioannis V. <iv...@em...> - 2003-07-05 20:08:34
|
> -----Original Message----- > From: Per Westermark [mailto:pw...@ia...] On Behalf > Of Per Westermark > Sent: Saturday, July 05, 2003 11:04 PM > To: Ioannis Vranos > Cc: 'Dev-Cpp Mailing List' > Subject: RE: [Dev-C++] Super charging the string class > > > Feature-wise, VC6 was old when it was released. > > And several bugs I had reported 6-12 month before the initial release > wan't fixed until after one or more service packs. Well VC++ 6 is a great tool if you want to learn C90. :-) Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |
|
From: Per W. <pw...@ia...> - 2003-07-05 20:20:23
|
How very true :-) Too bad it integrates one of the best environments in the world with such lousy c++ compatibility. By the way - Microsoft somehow noticed how great the IDE was, and totally rewrote it :-( Dev-C++ isn't really up to the challenge of the VC6 IDE, but I prefer Dev-C++ before the .Net IDE. /Per W On Sat, 5 Jul 2003, Ioannis Vranos wrote: > > -----Original Message----- > > From: Per Westermark [mailto:pw...@ia...] On Behalf > > Of Per Westermark > > Sent: Saturday, July 05, 2003 11:04 PM > > To: Ioannis Vranos > > Cc: 'Dev-Cpp Mailing List' > > Subject: RE: [Dev-C++] Super charging the string class > > > > > > Feature-wise, VC6 was old when it was released. > > > > And several bugs I had reported 6-12 month before the initial release > > wan't fixed until after one or more service packs. > > > Well VC++ 6 is a great tool if you want to learn C90. :-) > > > > > > > Ioannis Vranos > > * Programming pages: http://www.noicys.freeurl.com > * Alternative URL 1: http://run.to/noicys > * Alternative URL 2: http://www.noicys.cjb.net > > > > > ------------------------------------------------------- > 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://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |
|
From: Ioannis V. <iv...@em...> - 2003-07-05 20:32:53
|
VC++ 2003 has the same RAD with C# and VB. But I have not seen it myself. :( .NET rocks. Ioannis Vranos * 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: Per Westermark [mailto:pw...@ia...] On Behalf > Of Per Westermark > Sent: Saturday, July 05, 2003 11:22 PM > To: Ioannis Vranos > Cc: Dev-C++ Mailing List > Subject: RE: [Dev-C++] Super charging the string class > > > How very true :-) > > Too bad it integrates one of the best environments in the > world with such > lousy c++ compatibility. By the way - Microsoft somehow > noticed how great > the IDE was, and totally rewrote it :-( > > Dev-C++ isn't really up to the challenge of the VC6 IDE, but I prefer > Dev-C++ before the .Net IDE. |
|
From: Michal M. <mol...@se...> - 2003-07-05 20:16:08
|
Per Westermark wrote: > Feature-wise, VC6 was old when it was released. but the c++ library is still better than in gcc 2 (ok in gcc 3 is superb) 2 David: IMHO you can use STLport or SGI's STL under VC6 |
|
From: Ioannis V. <iv...@em...> - 2003-07-06 07:24:15
|
> -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of Michal Molhanec > Sent: Saturday, July 05, 2003 11:16 PM > To: dev...@li... > Subject: Re: [Dev-C++] Super charging the string class >=20 >=20 > Per Westermark wrote: >=20 > > Feature-wise, VC6 was old when it was released. >=20 > but the c++ library is still better than in gcc 2 (ok in gcc=20 > 3 is superb) From what I remember we could consider them as equal (each one = supporting features of the C++ standard library the other did not). However GCC 2.x = was better since VC++ 6 had also wrong language rules (like the wrong scope = of temporary variables inside a for loop). VC++ 2003 and GCC 3.x are great in terms of standard compliance. 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 >=20 > 2 David: IMHO you can use STLport or SGI's STL under VC6 >=20 >=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 |
|
From: Michal M. <mi...@mo...> - 2003-07-06 09:06:50
|
Ioannis Vranos wrote: >>From what I remember we could consider them as equal (each one supporting > features of the C++ standard library the other did not). However GCC 2.x was ok, i've never did serious comparation but c++ lib in gcc2 was really terrible. recently i was updating some lib, written originally for gcc2, where was a class derived from streambuf and iostream, and i must have one code both for vc6 and gcc3 and different for gcc2. if we look at stl: vector in gcc2 lacks even the at() method! > better since VC++ 6 had also wrong language rules (like the wrong scope of > temporary variables inside a for loop). if i remember correctly this you can change by disabling language extensions (the problem is that than you won't be able to include some header files :-) ) |
|
From: Ioannis V. <iv...@em...> - 2003-07-06 11:17:39
|
> -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of Michal Molhanec > Sent: Sunday, July 06, 2003 12:07 PM > To: dev...@li... > Subject: Re: [Dev-C++] Super charging the string class >=20 >=20 > ok, i've never did serious comparation but c++ lib in gcc2 was really=20 > terrible. recently i was updating some lib, written=20 > originally for gcc2,=20 > where was a class derived from streambuf and iostream, and i=20 > must have=20 > one code both for vc6 and gcc3 and different for gcc2. if we look at=20 > stl: vector in gcc2 lacks even the at() method! Yes it did, I remember that. However I never use vector<>::at() anyway. = :-) However VC++ missed things from the standard library which I do not = remember now, mainly because I was not using vc++ for C++. =20 > > better since VC++ 6 had also wrong language rules (like=20 > the wrong scope of > > temporary variables inside a for loop). >=20 > if i remember correctly this you can change by disabling language=20 > extensions (the problem is that than you won't be able to=20 > include some=20 > header files :-) ) Anyway with the existence of VC++ 2002/2003 and GCC 3.x we can forget = the bitter past (unless we have to work with VC++ 6/GCC 2.x nowadays). 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 |
|
From: Michal M. <mi...@mo...> - 2003-07-05 20:31:28
|
Per Westermark wrote: > Feature-wise, VC6 was old when it was released. but the c++ library is still better than in gcc 2 (ok in gcc 3 is superb) 2 David: IMHO you can use STLport or SGI's STL under VC6 2 admin: why isn't this mailing list setting correctly Reply-To header? Can you, please, do something with it? |
|
From: <al...@ne...> - 2003-07-07 09:00:55
|
Hello Michal, Saturday, July 5, 2003, 10:18:10 PM, you wrote: > 2 admin: why isn't this mailing list setting correctly Reply-To header? > Can you, please, do something with it? I'd also like to see a correct Reply-To in the header. There is List-Post: <mailto:dev...@li...> in the header, but my E-Mail client can't deal with that. Thanks, Alex |
|
From: Ioannis V. <iv...@em...> - 2003-07-07 10:49:55
|
> I'd also like to see a correct Reply-To in the header. There is > List-Post: <mailto:dev...@li...> > in the header, but my E-Mail client can't deal with that. Use the reply-to-all functionalit of your email client. Regarding the "bug" I do not know either why it exists. There has been an active discussion regarding the matter long ago, but I do not remember what was said. :-) Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |