Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Standard C++ Library

Reply
Thread Tools

Standard C++ Library

 
 
June Lee
Guest
Posts: n/a
 
      04-02-2008
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
 
Reply With Quote
 
 
 
 
lbonafide@yahoo.com
Guest
Posts: n/a
 
      04-02-2008
On Apr 1, 7:49 pm, June Lee <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
 
June Lee
Guest
Posts: n/a
 
      04-02-2008
So 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.

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      04-02-2008
June 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?
>
>> 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.


> 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.
 
Reply With Quote
 
Razii
Guest
Posts: n/a
 
      04-02-2008
On Tue, 01 Apr 2008 17:49:24 -0700, June Lee <(E-Mail Removed)> 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.
 
Reply With Quote
 
Anand Hariharan
Guest
Posts: n/a
 
      04-02-2008
On Wed, 02 Apr 2008 14:20:00 +1300, Ian Collins wrote:

> June Lee wrote:
>
> [Please don't top-post]
>

(...)
>> 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.
>


To the OP -

Ian meant "... widespread use, /boost/ being one." (cf. www.boost.org)

- Anand


--
ROT-13 email address to reply
 
Reply With Quote
 
lbonafide@yahoo.com
Guest
Posts: n/a
 
      04-02-2008
On Apr 1, 10:25 pm, Razii <(E-Mail Removed)> wrote:
> On Tue, 01 Apr 2008 17:49:24 -0700, June Lee <(E-Mail Removed)> 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.


What are you babbling about?
 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      04-02-2008
Anand Hariharan wrote:
> On Wed, 02 Apr 2008 14:20:00 +1300, Ian Collins wrote:
>
>> June Lee wrote:
>>
>> [Please don't top-post]
>>

> (...)
>>> 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.
>>

>
> To the OP -
>
> Ian meant "... widespread use, /boost/ being one." (cf. www.boost.org)
>



--
Ian Collins.
 
Reply With Quote
 
Razii
Guest
Posts: n/a
 
      04-02-2008
On Tue, 1 Apr 2008 20:53:36 -0700 (PDT), http://www.velocityreviews.com/forums/(E-Mail Removed) 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?


 
Reply With Quote
 
Yannick Tremblay
Guest
Posts: n/a
 
      04-02-2008
In article <(E-Mail Removed)>,
Razii <(E-Mail Removed)> wrote:
>On Tue, 1 Apr 2008 20:53:36 -0700 (PDT), (E-Mail Removed) wrote:
>
>
>>What are you babbling about?

>
>


Not sure why I am responding to what is mostly trolling but I'll take
your smiley and respond to face value.

>Where is the HashMap container in c++ standard library?


std::tr1::unordered_map

>It makes a big difference in speed if you use std::map vs HashMap in
>some situations. So where is the HashMap?


There's a key in the above sentence: "in some situation"

In many situation, both would do the job fine.
In some situation, a hash map is better.
In some situation, a balanced tree map is better
In some situation, a hash map is totally unacceptable.
In some situation, a balanced tree map is totally unacceptable.

Learning to figure out in which of the above situation you are is a
very important part of programming.

What are your requirements?
What are the typical performance requirements?
What are the worst case scenario requirements?

There are fairly fundamental performance differences between balanced
tree algorithm and hash algorith, one of the potentially important one
is worst case scenario search complexity. If like the
pseudo-benchmarks you write, you are only concerned about best
performance in one particular situation, the best solution might be
different than if you must make sure that your application performs
well in most cases and never ever perform worse than a set target.

If you are interested to learn, have a look at:
http://en.wikipedia.org/wiki/Hash_table
http://en.wikipedia.org/wiki/Red_black_tree

Note that the C++ standard doesn't requires that std::map be
implemented as a red-black tree. It only states complexity
requirements. Library implementors are free to choose whatever
algorithm they wish as long as it meets the requirements.

Yan

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rum-Time Library vs Standard Library Carmen Sei C++ 4 03-05-2008 10:09 AM
add pexpect to the standard library, standard "install" mechanism. funkyj Python 5 01-20-2006 08:35 PM
How standard is the standard library? steve.leach Python 1 04-18-2005 04:07 PM
Re: Possible additions to the standard library? (WAS: Aboutstandard library improvement) Daniel Bickett Python 0 02-04-2005 11:22 AM
Re: Possible additions to the standard library? (WAS: Aboutstandard library improvement) Fredrik Lundh Python 0 02-04-2005 07:34 AM



Advertisments