473,418 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Standard C++ Library

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
Apr 2 '08 #1
23 1745
On Apr 1, 7:49 pm, June Lee <iiu...@yahoo.comwrote:
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.
Apr 2 '08 #2
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.
Apr 2 '08 #3
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.
Apr 2 '08 #4
On Tue, 01 Apr 2008 17:49:24 -0700, June Lee <ii****@yahoo.comwrote:
>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.
Apr 2 '08 #5
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
Apr 2 '08 #6
On Apr 1, 10:25 pm, Razii <DONTwhatever...@hotmail.comwrote:
On Tue, 01 Apr 2008 17:49:24 -0700, June Lee <iiu...@yahoo.comwrote:
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?
Apr 2 '08 #7
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.
Apr 2 '08 #8
On Tue, 1 Apr 2008 20:53:36 -0700 (PDT), lb*******@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?
Apr 2 '08 #9
On Apr 2, 12:16 am, Razii <DONTwhatever...@hotmail.comwrote:
On Tue, 1 Apr 2008 20:53:36 -0700 (PDT), lbonaf...@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?
Two questions: Why did you troll this thread? Have you ever written
a piece of production software in your life?
Apr 2 '08 #10
On Wed, 2 Apr 2008 04:47:50 -0700 (PDT), lb*******@yahoo.com wrote:
>Have you ever written
a piece of production software in your life?
Nor did I ever claim that's what I do for living :)

Apr 2 '08 #11
On Apr 2, 7:05 am, Razii <DONTwhatever...@hotmail.comwrote:
On Wed, 2 Apr 2008 04:47:50 -0700 (PDT), lbonaf...@yahoo.com wrote:
Have you ever written
a piece of production software in your life?

Nor did I ever claim that's what I do for living :)
That's obvious, as you seem to be capable of toy programs only and
don't seem to understand the complexities of developing robust
software that performs well.

Why don't you include Python in your benchmarks? I'm sure Java and C+
+ would beat the fool out of it, and yet it is used by Google,
YouTube, NASA, Industrial Light and Magic, and many other large
organizations to real production work. Just the same, you could burst
in their front doors waving your arms like a maniac telling them that
it is too slow. Maybe they'd listen to you. Maybe they'd call
security. I think it's worth a shot.
Apr 2 '08 #12
On Wed, 2 Apr 2008 05:22:22 -0700 (PDT), lb*******@yahoo.com wrote:
>Why don't you include Python in your benchmarks?
Why don't you? Let me see a Python and Perl version.
>I'm sure Java and C+
+ would beat the fool out of it, and yet it is used by Google,
YouTube, NASA, Industrial Light and Magic, and many other large
organizations to real production work.
I never claimed speed is everything, but that's the topic we have been
discussing, for fun obviously.
>Just the same, you could burst
in their front doors waving your arms like a maniac telling them that
it is too slow. Maybe they'd listen to you. Maybe they'd call
security. I think it's worth a shot.
now that's funny :)

How come you have FIDE in your email?
Apr 2 '08 #13
On Apr 2, 3:20 am, Ian Collins <ian-n...@hotmail.comwrote:
June Lee wrote:
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.
So which is it: anything else is platform specific, or there are
several cross-platform libraries? And I'm pretty sure you mean
Boost, not boot. (Not that that's the only cross-platform
library around.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Apr 2 '08 #14
Razii 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.
*plonk*


Brian
Apr 2 '08 #15
On 03 Apr 2008 09:57:50 GMT, yt******@nyx.nyx.net (Yannick Tremblay)
wrote:
>$ sort bible.txt sortedbible.txt
>Using such an utility, generating somewhat sorted data is trivial. e,g:
I think you are a little confused. This is not the sorting bible
problem. This one counts up the frequency of each word, and it makes
no difference if the data is already sorted. The sort is done to print
output (.e words) in nice format. Here, I wilt post it to a blogpage
that explains it..

Why is C++ slower than Java?

http://razi2.blogspot.com/2008/04/wh...than-java.html


Apr 3 '08 #16
On Fri, 04 Apr 2008 00:39:22 +0200, Paul Brettschneider
<pa*****************@yahoo.frwrote:
>Anyway, a few changes and down to 750 ms from 6500 ms:
lol at "few" changes. I haven't tested it yet but I don't see <mapin
your version.
Apr 3 '08 #17
On Fri, 04 Apr 2008 00:39:22 +0200, Paul Brettschneider
<pa*****************@yahoo.frwrote:
>Anyway, a few changes and down to 750 ms from 6500 ms:
By the way, your output doesn't print total number of words at top.

lines words bytes file
303828 0 40473918 bible2.txt
303828 0 40473918 bible2.txt
--------------------------------------
607656 0 80947836 total---------
Apr 4 '08 #18
Razii wrote:
On Fri, 04 Apr 2008 00:39:22 +0200, Paul Brettschneider
<pa*****************@yahoo.frwrote:
>>Anyway, a few changes and down to 750 ms from 6500 ms:

By the way, your output doesn't print total number of words at top.
Then fix it. I'm not your nanny.
Apr 4 '08 #19
On Fri, 04 Apr 2008 09:01:19 +0200, Paul Brettschneider
<pa*****************@yahoo.frwrote:
>Then fix it. I'm not your nanny.
You forgot w_cnt++, not me. Anyway, that was pretty impressive jump in
speed :) though still slower than UPP
Apr 4 '08 #20
On Fri, 04 Apr 2008 15:13:24 +0200, Paul Brettschneider
<pa*****************@yahoo.frwrote:
>And of course you can write the same silly code with std::map. It's slower
then, but still 4-5 times faster than the original.
I didn't compile but doesn't matter. You are still using trie data
structure.

Apr 5 '08 #21
Razii wrote:
On Fri, 04 Apr 2008 15:13:24 +0200, Paul Brettschneider
<pa*****************@yahoo.frwrote:
>>And of course you can write the same silly code with std::map. It's slower
then, but still 4-5 times faster than the original.

I didn't compile but doesn't matter.
Then fix it. You might even learn something, though you seem to be genuinely
not interested in learning. Your loss.
You are still using trie data
structure.
So what? You wanted a faster program which uses std::map and I gave you a
400-500% speed increase. Not too shabby, IMHO. BTW: I get another 20% speed
improvement by using non-buffered IO, but leave that to you as an exercise.
Apr 5 '08 #22
On Sat, 05 Apr 2008 11:55:15 +0200, Paul Brettschneider
<pa*****************@yahoo.frwrote:
>Then fix it. You might even learn something, though you seem to be genuinely
not interested in learning. Your loss.
LOL. You post code that doesn't compile or is missing things (like
total words in the last versions) and then, you ask people to fix it.
I am not here to learn. I am here for having fun. If wanted to learn,
I would go to school or buy books. Why would I come to USENET?

By the way, thanks for the hint. I updated my java version with the
new data structure. It's twice faster :)

However, it's still slower than UPP.
Apr 5 '08 #23
Razii wrote:
On Sat, 05 Apr 2008 11:55:15 +0200, Paul Brettschneider
<pa*****************@yahoo.frwrote:
>>Then fix it. You might even learn something, though you seem to be
genuinely not interested in learning. Your loss.

LOL. You post code that doesn't compile or is missing things (like
total words in the last versions) and then, you ask people to fix it.
I am not here to learn. I am here for having fun. If wanted to learn,
I would go to school or buy books. Why would I come to USENET?
This might be news to you, but for many people learning is actually fun. And
I know Usenet is a great pool of knowledge. You seem to gain fun from being
and staying a brat. Again: your loss.
Apr 5 '08 #24

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: skoco | last post by:
Hello! Do you know when will be the new standard for c++ approved? And WHAT will be inside? Hope there will be some thread and synchro classes, text and XML parsing, new containers and other new...
71
by: Christopher Benson-Manica | last post by:
At what point was the .h dropped from the STL headers? I just had a discussion yesterday with my boss, who said he wanted .h on all the STL includes, despite me protesting that it was not...
43
by: Steven T. Hatton | last post by:
Now that I have a better grasp of the scope and capabilities of the C++ Standard Library, I understand that products such as Qt actually provide much of the same functionality through their own...
8
by: Sensei | last post by:
I have a quick question about the math library included in the standard C90 (and 99). The gcc, xlc and possibly other compilers/linkers on some unix platforms cannot use any math functions in...
6
by: junky_fellow | last post by:
On what basis it is decided that a particular funtion should be a part of Standard C library ? Do I get these standard C libraries along with the C compiler ? Or I can use the c complier from...
3
by: arnuld | last post by:
Hello, i posted this question more than 1 month ago but did not get any answers, so i am posting it again (1). with advice form archives @ alt.comp.lang.learn.c-c++, comp.lang.c++,...
22
by: David Mathog | last post by:
One thing that keeps coming up in this forum is that standard C lacks many functions which are required in a workstation or server but not possible in an embedded controller. This results in a...
20
by: J de Boyne Pollard | last post by:
MThe library functions which are included to allow process Mlaunch, forking, and termination, imply that it is both Mpossible and desirable for a process to fork itself. This is Ma fundamental...
126
by: Dann Corbit | last post by:
Rather than create a new way of doing things: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2497.html why not just pick up ACE into the existing standard:...
16
by: subramanian100in | last post by:
Program 1: --------------- #include <cstdlib> #include <iostream> #include <vector> using namespace std; int main() {
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.