Code Comments
Programming Forum and web based access to our favorite programming groups.is it true that Standard C++ Library is pretty much include functions similar to the following java packages??? java.io java.lang java.util http://www.cplusplus.com/reference/ It seem to me the Standard C++ Library have headers to mainipulate string / characters, doing I/O, and data structure like Stack, Queue, HashMap, Vector, time, bitwise operation, exception, iterator on a collection ... etc which pretty similar to above "very core" java package
Post Follow-up to this messageOn Apr 1, 7:49 pm, June Lee <iiu...@yahoo.com> wrote: > is it true that Standard C++ Library is pretty much include functions > similar to the following java packages??? > > java.io > java.lang > java.util > > http://www.cplusplus.com/reference/ > > It seem to me the Standard C++ Library have headers to mainipulate > string / characters, doing I/O, and data structure like Stack, Queue, > HashMap, Vector, time, bitwise operation, exception, iterator on a > collection ... etc > > which pretty similar to above "very core" java package Yes, C++ is a very portable general purpose language that runs on platforms ranging from super computers to embedded devices. Many of these platforms and applications which run on them do not require everything all the time, so it doesn't make sense to stuff GUI, networking, threading, etc. all into the standard library.
Post Follow-up to this messageSo there are 3 types of library / header in C++? CRT (C runtime library) Standard C++ Library Platform SDK for Visual C++ where CRT is low level code like doing all the bit and bytes where Platform SDK is high level code doing all those Web Service, Security, Message Queue, UI / GUI, COM, HTTP / networking stuff? any other must have / used alot kind of library for C++ that programmer use alot besides the above 3 library? >Yes, C++ is a very portable general purpose language that runs on >platforms ranging from super computers to embedded devices. Many of >these platforms and applications which run on them do not require >everything all the time, so it doesn't make sense to stuff GUI, >networking, threading, etc. all into the standard library.
Post Follow-up to this messageJune Lee wrote: [Please don't top-post] > > where CRT is low level code like doing all the bit and bytes > where Platform SDK is high level code doing all those Web Service, > Security, Message Queue, UI / GUI, COM, HTTP / networking stuff? > > any other must have / used alot kind of library for C++ that > programmer use alot besides the above 3 library? > > So there are 3 types of library / header in C++? > > CRT (C runtime library) > Standard C++ Library > Platform SDK for Visual C++ No, there's the C++ standard library, which includes the C standard library. Anything else is platform specific. There are several cross-platform libraries that are in widespread use, boot being one. -- Ian Collins.
Post Follow-up to this messageOn Tue, 01 Apr 2008 17:49:24 -0700, June Lee <iiuu66@yahoo.com> wrote: >It seem to me the Standard C++ Library have headers to mainipulate >string / characters, doing I/O, and data structure like Stack, Queue, >HashMap, Vector, time, bitwise operation, exception, iterator on a >collection ... etc Where is this HashMap container in the Standard C++ Library? Poor "Bo Persson" can't find it. Something he needs to speed up the word counting benchmark, which for now is more than 2 times slower.
Post Follow-up to this messageOn Wed, 02 Apr 2008 14:20:00 +1300, Ian Collins wrote: > June Lee wrote: > > [Please don't top-post] > (...) > > No, there's the C++ standard library, which includes the C standard librar y. > > Anything else is platform specific. > > There are several cross-platform libraries that are in widespread use, > boot being one. > To the OP - Ian meant "... widespread use, /boost/ being one." (cf. www.boost.org) - Anand -- ROT-13 email address to reply
Post Follow-up to this messageOn Apr 1, 10:25 pm, Razii <DONTwhatever...@hotmail.com> wrote: > On Tue, 01 Apr 2008 17:49:24 -0700, June Lee <iiu...@yahoo.com> wrote: > > Where is this HashMap container in the Standard C++ Library? Poor "Bo > Persson" can't find it. Something he needs to speed up the word > counting benchmark, which for now is more than 2 times slower. What are you babbling about?
Post Follow-up to this messageAnand Hariharan wrote: > On Wed, 02 Apr 2008 14:20:00 +1300, Ian Collins wrote: > > (...) > > To the OP - > > Ian meant "... widespread use, /boost/ being one." (cf. www.boost.org) > :) -- Ian Collins.
Post Follow-up to this messageOn Tue, 1 Apr 2008 20:53:36 -0700 (PDT), lbonafide@yahoo.com wrote: >What are you babbling about? :) Where is the HashMap container in c++ standard library? Got it this time? It makes a big difference in speed if you use std::map vs HashMap in some situations. So where is the HashMap?
Post Follow-up to this messageOn 02 Apr 2008 11:11:51 GMT, ytrembla@nyx.nyx.net (Yannick Tremblay) wrote: > >std::tr1::unordered_map WC2.cpp(12) : fatal error C1083: Cannot open include file: 'tr1/unordered_map': No such file or directory > >There's a key in the above sentence: "in some situation" > >In many situation, both would do the job fine. In this case, word counting app, the speed will improve greatly by using hashmap (that's my guess). The hashmap can be converted back to ordered at the end by transferring it into ordered map. >If like the pseudo-benchmarks you write.. It was not my 'benchmarks'. Someone, here on this newsgroup, gave me this page: http://www.digitalmars.com/d/2.0/cppstrings.html and asked me to write Java version. I have no Java (or any programming) experience but still, without any problem, wrote a version that is 2.3 times faster than the C++ version cited on the above page (for 40 MB text files) http://pastebin.com/f529d07e5 How do you explain that?
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.