Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!solace!nntp.uio.no!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!panix!news.panix.com!not-for-mail From: comeau@panix.com (Greg Comeau) Newsgroups: comp.unix.solaris,comp.unix.aix,comp.unix.bsd,comp.unix.sco.programmer,comp.unix.programmer,comp.unix.programmer,comp.unix.ultrix,comp.unix.questions,comp.lang.c++ Subject: Re: CString on UNIX Date: 28 Mar 1997 09:37:56 -0500 Organization: Comeau Computing Lines: 49 Distribution: inet Message-ID: <5hgl44$34u@panix.com> References: <5hch2a$7m8@tor-nn1-hb0.netcom.ca> <5he56g$5e6@panix.com> <5hfj1l$ej3@tor-nn1-hb0.netcom.ca> Reply-To: comeau@comeaucomputing.com NNTP-Posting-Host: panix.com X-Newsposter: trn 4.0-test55 (26 Feb 97) Xref: euryale.cc.adfa.oz.au comp.unix.solaris:101537 comp.unix.aix:96778 comp.unix.bsd:16879 comp.unix.sco.programmer:5923 comp.unix.programmer:51968 comp.unix.ultrix:28663 comp.unix.questions:97486 comp.lang.c++:228123 In article <5hfj1l$ej3@tor-nn1-hb0.netcom.ca> variable@netcom.ca (Chris McKillop) writes: >:>> >:>> Well, there is a simple and VERY cross platform >:>>solution. First step, stop using CString. Instead, >:>>use the STL template class string. The STL is now part >:>>of the C++ standard library, and is very crossplatform. You >:>>might want to check out http://www.ipmce.su/people/fbp/stl/stlport.html >:>>though, as the version of the STL that comes with VC++ v4.2 >:>>isn't very good. (No fault for Mr. Plaugher, more the fault of >:>>the compilier). >:> >Greg Comeau wrote: >:>Just a minor nitpick -- I agree with everything you've said otherwise, >:>just that I've seen a number of people confused/disappointed on this in >:>the past -- but string is not part of STL. It is part of the draft >:>C++ Library, which STL is a part of too. But since string is such >:>a fundamental, and will often be used with STL, it is good to know about it. >:>Furthermore, it has been made _compatible_ with STL by allowing iterators >:>to be defined for it. >:> > > Thank you! :) > > I don't like posting things that aren't totally correct, and now >I will be sure not to add string as part of the STL. My own confusion >comes from the fact that string uses iterators in most implementations >I have used. Yes, there is a tie into STL because of the iterators. Actually, the other side of the coin is that there really is nothing formally called the STL in the draft, it is just a term the industry has applied to that group of stuff. > Are there any other data containers that have been STLified >in the C++ stdlib? Off-hand I don't think so. >Now that I think about it, string really isn't a template now is it? :) Yes, string is (indirectly, because it is a typedef) a template. - Greg -- Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418-3214 Producers of Comeau C++ 4.0 front-end pre-release ****WEB: http://www.comeaucomputing.com / Voice:718-945-0009 / Fax:718-441-2310 Here:comeau@comeaucomputing.com / BIX:comeau or comeau@bix.com / CIS:72331,3421