RE: [Dev-C++] regarding string manipulation (to James & Ramana & Biswa)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: James G. <Jam...@Cl...> - 2001-01-02 16:13:50
|
Try http://www.dinkumware.com/htm_cpl/string2.html. The STL (Standard Template Library) is a set of templates to help in the creation of containers e.g. lists, maps, queues; maths, memory management and vectors (can be used in place of char*). For example if you need a list of any type then creating a list<string> you can create a list of C++ strings which you can iterate over, sort, merge two lists, erase add to and compare etc. You can create lists of your own types which save a lot of time having to hand craft your own. Regards, James. -----Original Message----- From: Alan Thomas [mailto:ala...@3n...] Sent: Tuesday, January 02, 2001 3:41 PM To: dev...@li... Subject: [Dev-C++] regarding string manipulation (to James & Ramana & Biswa) Regarding recent string manipulation messages: James, Exactly where can I find the documentation on the std C++ string classes? Thanks, Alan From: James Gordon <Jam...@Cl...> C++ Strings have a lot of the functionality of the str... type functions built into the classes. If you need to pass a char* to a function you can use c_str() which returns a char*. Best to read the doc's. Ramana, and/or Biswa: I started out using C++ mostly like a variation of C. However, I have found that it is VERY easy to make your program hang using "char *some_string" for string manipulation --- esp. if you pass a parameter of the form "char *some_string" vice "char some_string[]". Since I am doing a lot of string manipulation, I think going with some sort of string class would be best. I, like you, have not determined the right approach yet. (I am a little less concerned with efficiency for my applications.) My question is: What is the "C++ string class" as opposed to the "STL stuff"? Thanks, Alan _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This electronic message and any attachment is intended to be read by the named addressee(s) only. Any other recipient should be aware that its contents may be legally privileged and/or confidential and that its use, disclosure, copying or distribution may be unlawful. Unless you are a named addressee, please delete this message Whilst C. & J. Clark International Limited has taken steps to prevent the transmission of computer viruses with electronic mail, responsibility for screening incoming messages and the risk of such transmission and its consequences lies with the recipient. C. & J. Clark International Limited Registered in England and Wales Company No. 141015 Registered Office: 40 High Street, Street, Somerset BA16 0YA Telephone: +44 (0) 1458 443131 Fax: +44 (0) 1458 447547 |