D
Default User
Alexander said:I can live with it. Sublimation, you know.
From the sublime to the ridiculous. Happens all the time.
Brian Rodenborn
Alexander said:I can live with it. Sublimation, you know.
Bjarne Stroustrup wrote:
[...]To understand a language is to understand the programming techniques
it supports and how it supports them.
AFAICS, C++ doesn't support things like: (see TC++PL)
void g(priority_queue<string,String_cmp>& pq)
{
priority_queue<string> pq2(String_cmp(nocase));
priority_queue said:pq = pq2; // ok: pq and pq2 are of the same type, pq now also uses String_cmp(nocase)
}
Or am I just missing (e.g. some errata) and/or misunderstanding something?
presumably:
priority_queue<string,String_cmp> pq2(String_cmp(nocase));
Yep.
What's wrong with the code fragment (apart from the typo)?
Uhmm. Based on the TC++PL quotation below, I tend to clasify it as a
thinko ("ala Bazarov"; see the context from there it all comes from),
not typo.
<quote>
map<string,int> m1;
map<string,int,Nocase> m2; // specify comparison type (§17.1.4.1)
map<string,int,String_cmp> m3; // specify comparison type (§17.1.4.1)
map<string,int> m4(String_cmp(literary)); // pass comparison object
</quote>
I may be missing and/or misunderstanding something, of course.
You can find the errata on my home pages,
but if you have an early
edition, it might be worth upgrading. The latest printing is the 18th.
Alexander Terekhov said:I have the 3rd edition pdf(s) [1st printing, I guess] from the IBM
Visual Age C/C++. Uhmm, perhaps you can provide a patch, oder? ;-)
Bjarne said:Alexander Terekhov said:I have the 3rd edition pdf(s) [1st printing, I guess] from the IBM
Visual Age C/C++. Uhmm, perhaps you can provide a patch, oder? ;-)
I think what they shipped with the IBM compiler was something like a
3rd printing. It's now 1000+ corrections/improvements and two
appendices behind. If I were actually using it, I'd retire it to my
personal museum and get a new printing.
I do provide "patches" aka errata, and the two extra appendices are
also on my home pages as is the C/C++ compatibility appendix (by
popular demand). However, "patches" will only get you so far.
I have read many of the topics on learning C++ or Java first.
It seems like everyone says something different.
I would like to know if I should learn C++ or Java.
First a little about myself.
I know PHP, BASIC, and of course HTML.
I'll be 15 years old in September.
I am interested in programming GUI applications.
I am also interested in programming games.
I know that I should learn C++ to program games, but would learning
Java make the process any easier? Or am I better of just diving right
into C++?
Are there any recommended books on Java or C++ (depending on which
language I should learn first) for the beginner who only know PHP and
BASIC?
Bladez said:i personaly think learning C++ first then maybe doing java , C++ will
probley give u a better idea on java
Fred said:Outside of very basic similarities in syntax, one will not really help you
with the other.
Learn first whatever you think will pay the bills the quickest.
Java is actually more complicated to learn, not because of the language
itself, but because of all the extra subsystems one needs to know in
today's marketplace -- J2EE, Struts, JSP, etc.
-Fred
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.